Re: Setting pd_lower in GIN metapage

Amit Langote <langote_amit_f8@lab.ntt.co.jp>

From: Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
To: Michael Paquier <michael.paquier@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Amit Kapila <amit.kapila16@gmail.com>, Masahiko Sawada <sawada.mshk@gmail.com>, Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2017-09-13T07:43:28Z
Lists: pgsql-hackers
On 2017/09/13 16:20, Michael Paquier wrote:
> On Wed, Sep 13, 2017 at 2:48 PM, Amit Langote
> <Langote_Amit_f8@lab.ntt.co.jp> wrote:
>> I updated the patches so that the metapage's pd_lower is set to the
>> correct value just before *every* point where we are about to insert a
>> full page image of the metapage into WAL.  That's in addition to doing the
>> same in various metapage init routines, which the original patch did
>> already anyway.  I guess this now ensures that wal_consistency_checking
>> masking of these metapages as standard layout pages always works, even for
>> pre-v11 indexes that were upgraded.
> 
> Please note that I do have plans to look at all the patches proposed
> on this thread for all the indexes next. No report for today though as
> those deal with many code paths so it requires some attention. I think
> I'll group the review for all index AMs into the same email if you
> don't mind, each patch deals with its own thing in its own
> src/backend/access/ path.

Sure, no problem.

Thanks,
Amit



Commits

  1. Flag index metapages as standard-format in xlog.c calls.

  2. Set the metapage's pd_lower correctly in brin, gin, and spgist indexes.