Re: Setting pd_lower in GIN metapage

From: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Setting pd_lower in GIN metapage
Date: 2017-09-13 02:54:41
Message-ID: 46da3ab8-e297-9492-c0a4-0de8d2906bc2@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox
Thread:
Lists: pgsql-hackers

Thanks for the review.

On 2017/09/12 23:27, Amit Kapila wrote:
> On Tue, Sep 12, 2017 at 3:51 PM, Amit Langote wrote:
>> I updated the patches for GIN, BRIN, and SP-GiST to include the following
>> changes:
>>
>> 1. Pass REGBUF_STNADARD flag when registering the metapage buffer
>>
>
> I have looked into brin patch and it seems you have not considered all
> usages of meta page. The structure BrinRevmap also contains a
> reference to meta page buffer and when that is modified (ex. in
> revmap_physical_extend), then also I think you need to consider using
> REGBUF_STNADARD flag.

Fixed.

>> Did I miss something from the discussion?
>>
>
> I think one point which might be missed is that the patch needs to
> modify pd_lower for all usages of metapage, not only when it is first
> time initialized.

Maybe I'm missing something, but isn't the metadata size fixed and hence
pd_lower won't change once it's initialized? Maybe, it's not true for all
index types?

Thanks,
Amit

Attachment Content-Type Size
0001-Set-pd_lower-correctly-in-the-GIN-metapage.patch text/plain 4.0 KB
0002-Set-pd_lower-correctly-in-the-BRIN-index-metapage.patch text/plain 3.5 KB
0003-Set-pd_lower-correctly-in-the-SP-GiST-index-metapage.patch text/plain 3.0 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2017-09-13 03:05:05 Re: Race between SELECT and ALTER TABLE NO INHERIT
Previous Message Michael Paquier 2017-09-13 02:47:11 Re: [Proposal] Allow users to specify multiple tables in VACUUM commands