Re: Freeze avoidance of very large table.

From: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, Josh Berkus <josh(at)agliodbs(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Petr Jelinek <petr(at)2ndquadrant(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Greg S <stark(at)mit(dot)edu>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
Subject: Re: Freeze avoidance of very large table.
Date: 2015-11-13 05:36:54
Message-ID: CAD21AoByJ_D91uV5mPvR6wm__hp6v0iJpxENL92rBbYo33gb1g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox
Thread:
Lists: pgsql-hackers

On Fri, Nov 13, 2015 at 1:44 PM, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
> On Fri, Nov 13, 2015 at 4:48 AM, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>
> wrote:
>>
>>
>> Thank you for reviewing the patch.
>>
>> I changed the patch so that the visibility map become the page info
>> map, in source code and documentation.
>>
>
> One thing to notice is that this almost doubles the patch size which
> might makes it slightly difficult to review, but on the other hand if
> no-body opposes for such a change, this seems to be the right direction.

I believe that it's going to right direction.
But I think we didn't get consensus about this changes yet, so it might go back.

>
>> And fixed review comments I received.
>> Attached v22 patch.
>>
>> > I think both the above cases could happen for frozen state
>> > as well, unless you think otherwise, we need similar handling
>> > for frozen bit.
>>
>> It's not happen the situation where is all-frozen and not all-visible,
>> and the bits of visibility map are cleared at the same time, page
>> flags are as well.
>> So I think it's enough to handle only all-visible situation. Am I
>>
>> missing something?
>>
>
> No, I think you are right as information for both is cleared together
> and all-visible is superset of all-frozen (means if all-frozen is set,
> then all-visible must be set), so it is sufficient to check visibility
> info in above situation, but I feel we can update the comment to
> indicate the same and add an Assert to ensure if all-frozen is set
> all-visibile must be set.

I agree.
I added Assert() macro into lazy_scan_heap() and some comments.
Attached v23 patch.

Regards,

--
Masahiko Sawada

Attachment Content-Type Size
000_page_info_map_v23.patch text/x-patch 171.2 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2015-11-13 07:31:29 Re: checkpointer continuous flushing
Previous Message Robert Haas 2015-11-13 05:26:28 Re: Parallel Seq Scan