From: | Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> |
---|---|
To: | Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp> |
Cc: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Setting pd_lower in GIN metapage |
Date: | 2017-06-26 07:11:34 |
Message-ID: | CAD21AoBDiTOfOFqcdgFEWZrQXHNX0HkKRwVLzs+FN-U+8o-mFA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Jun 26, 2017 at 3:54 PM, Amit Langote
<Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp> wrote:
> On 2017/06/26 10:54, Michael Paquier wrote:
>> On Fri, Jun 23, 2017 at 11:17 AM, Amit Langote
>> <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp> wrote:
>>> That was it, thanks for the pointer.
>>
>> GinInitMetabuffer() sets up pd_lower and pd_upper anyway using
>> PageInit so the check of PageIsVerified is guaranteed to work in any
>> case. Upgraded pages will still have their pd_lower set to the
>> previous values, and new pages will have the optimization. So this
>> patch is actually harmless for past pages, while newer ones are seen
>> as more compressible.
>
> Right.
>
>>> Attached updated patch, which I confirmed, passes wal_consistency_check = gin.
>>
>> I have spent some time looking at this patch, playing with pg_upgrade
>> to check the state of the page upgraded. And this looks good to me.
>
> Thanks for the review.
>
>> One thing that I noticed is that this optimization could as well
>> happen for spgist meta pages. What do others think?
>
> I agree. As Sawada-san mentioned, brin metapage code can use a similar patch.
>
> So attached are three patches for gin, brin, and sp-gist respectively.
> Both brin and sp-gist cases didn't require any special consideration for
> passing wal_consistency_checking, as the patch didn't cause brin and
> sp-gist metapages to become invalid when recreated on standby (remember
> that patch 0001 needed to be updated for that).
>
Thank you for the patches! I checked additional patches for brin and
spgist. They look good to me.
Regards,
--
Masahiko Sawada
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center
From | Date | Subject | |
---|---|---|---|
Next Message | atorikoshi | 2017-06-26 07:29:19 | Remove old comments in dependencies.c and README.dependencies |
Previous Message | Ashutosh Sharma | 2017-06-26 07:02:10 | Re: pg_filedump doesn't compile with v10 sources |