Re: [HACKERS] Setting pd_lower in GIN metapage - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] Setting pd_lower in GIN metapage
Date
Msg-id 18485.1505275519@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] Setting pd_lower in GIN metapage  (Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>)
Responses Re: [HACKERS] Setting pd_lower in GIN metapage  (Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>)
List pgsql-hackers
Amit Langote <Langote_Amit_f8@lab.ntt.co.jp> writes:
> On 2017/09/12 23:27, Amit Kapila wrote:
>> 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?

No, the point is that you might be dealing with an index recently
pg_upgraded from v10 or before, which does not have the correct
value for pd_lower on that page.  This has to be coped with.
        regards, tom lane


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: [HACKERS] plpgsql - additional extra checks
Next
From: Masahiko Sawada
Date:
Subject: Re: [HACKERS] DROP SUBSCRIPTION hangs if sub is disabled in the same transaction