Re: Freeze avoidance of very large table.

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

On Wed, Jan 13, 2016 at 12:16 AM, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> wrote:
> On Mon, Dec 28, 2015 at 6:38 PM, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> wrote:
>> On Mon, Dec 21, 2015 at 11:54 PM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>>> On Mon, Dec 21, 2015 at 3:27 AM, Kyotaro HORIGUCHI
>>> <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp> wrote:
>>>> Hello,
>>>>
>>>> At Fri, 18 Dec 2015 12:09:43 -0500, Robert Haas <robertmhaas(at)gmail(dot)com> wrote in <CA+TgmoZCCFwgKL0PmSi=htfZ2aCOZPoTPD73ecvSA9rhXa0zUw(at)mail(dot)gmail(dot)com>
>>>>> On Thu, Dec 17, 2015 at 1:17 AM, Michael Paquier
>>>>> <michael(dot)paquier(at)gmail(dot)com> wrote:
>>>>> > I am not really getting the meaning of this sentence. Shouldn't this
>>>>> > be reworded something like:
>>>>> > "Freezing occurs on the whole table once all pages of this relation require it."
>>>>>
>>>>> That statement isn't remotely true, and I don't think this patch
>>>>> changes that. Freezing occurs on the whole table once relfrozenxid is
>>>>> old enough that we think there might be at least one page in the table
>>>>> that requires it.
>>>>
>>>> I doubt I can explain this accurately, but I took the original
>>>> phrase as that if and only if all pages of the table are marked
>>>> as "requires freezing" by accident, all pages are frozen. It's
>>>> quite obvious but it is what I think "happen to require freezing"
>>>> means. Does this make sense?
>>>>
>>>> The phrase might not be necessary if this is correct.
>>>
>>> Maybe you are trying to say something like "only those pages which
>>> require freezing are frozen?".
>>>
>>
>> I was thinking the same as what Horiguchi-san said.
>> That is, even if relfrozenxid is old enough, freezing on the whole
>> table is not required if the table are marked as "not requires
>> freezing".
>> In other word, only those pages which are marked as "not frozen" are frozen.
>>
>
> The recently changes to HEAD conflicts with freeze map patch, so I've
> updated and attached latest freeze map patch.
> The another patch that enhances the debug log message of visibilitymap
> is attached to previous mail.
> <http://www.postgresql.org/message-id/CAD21AoBScUD4k_QWrYGRmbXVruiekPY=2BY2Fxhqq55a+tzUxg@mail.gmail.com>.
>
> Please review it.
>

Attached updated version patch.
Please review it.

Regards,

--
Masahiko Sawada

Attachment Content-Type Size
000_add_frozen_bit_into_visibilitymap_v33.patch binary/octet-stream 89.7 KB
001_enhance_visibilitymap_debug_messages_v1.patch binary/octet-stream 1.6 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message José Arthur Benetasso Villanova 2016-01-17 13:57:09 Log operating system user connecting via unix socket
Previous Message Andreas Seltenreich 2016-01-17 11:38:26 [PATCH] Improve spinlock inline assembly for x86.