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
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers