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: Amit Kapila <amit.kapila16@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>,
Masahiko Sawada <sawada.mshk@gmail.com>,
Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2017-09-26T07:22:57Z
Lists: pgsql-hackers
Attachments
- 0001-Set-pd_lower-correctly-in-the-GIN-metapage.patch (text/plain) patch 0001
- 0002-Set-pd_lower-correctly-in-the-BRIN-index-metapage.patch (text/plain) patch 0002
- 0003-Set-pd_lower-correctly-in-the-SP-GiST-index-metapage.patch (text/plain) patch 0003
On 2017/09/26 12:17, Michael Paquier wrote: > On Mon, Sep 25, 2017 at 3:48 PM, Amit Langote wrote: >> So, ISTM, comments that the patches add should all say that setting the >> meta pages' pd_lower to the correct value helps to pass those pages to >> xlog.c as compressible standard layout pages, regardless of whether they >> are actually passed that way. Even if the patches do take care of the >> latter as well. >> >> Did I miss something? > > Not that I think of. Thanks. > Buffer metabuffer; > + Page metapage; > SpGistMetaPageData *metadata; > > metabuffer = ReadBuffer(index, SPGIST_METAPAGE_BLKNO); > + metapage = BufferGetPage(metabuffer); > No need to define metapage here and to call BufferGetPage() as long as > the lock on the buffer is not taken. Ah, okay. Moved those additions inside the if (ConditionalLockBuffer(metabuffer)) block. > Except that small thing, the patches do their duty. Thanks, revised patches attached. Regards, Amit
Commits
-
Flag index metapages as standard-format in xlog.c calls.
- 4c11d2c559e7 11.0 landed
-
Set the metapage's pd_lower correctly in brin, gin, and spgist indexes.
- 81e334ce4e6d 11.0 landed