Re: [COMMITTERS] pgsql: Fix traversal of half-frozen update chains - Mailing list pgsql-committers

From Peter Geoghegan
Subject Re: [COMMITTERS] pgsql: Fix traversal of half-frozen update chains
Date
Msg-id CAH2-Wz=wQKZ9q9XV5FufSrObHgv1Ld18vPBx0_Jw73VZvY4Rag@mail.gmail.com
Whole thread Raw
In response to Re: [COMMITTERS] pgsql: Fix traversal of half-frozen update chains  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Responses Re: [COMMITTERS] pgsql: Fix traversal of half-frozen update chains  (Peter Geoghegan <pg@bowt.ie>)
List pgsql-committers
On Tue, Oct 17, 2017 at 3:40 AM, Alvaro Herrera <alvherre@alvh.no-ip.org> wrote:
> Peter Geoghegan wrote:
>
>> Wouldn't this last "if" test, to cover the pg_upgrade case, be better
>> targeted by comparing *raw* xmin to FrozenTransactionId? You're using
>> the potentially distinct xmin value returned by
>> HeapTupleHeaderGetXmin() for the test here. I think we should be
>> directly targeting tuples frozen on or before 9.4 (prior to
>> pg_upgrade) instead.
>
> I also realized we can stop checking (i.e. don't compare xmin to
> frozenxid) if the XMIN_FROZEN bits are set -- because in that case the
> tuple cannot possibly come from 9.3 frozen.  So I think this should do
> it.
>
> (New HeapTupleUpdateXmaxMatchesXmin() implementation)

Yeah, this is what I had in mind, too.

-- 
Peter Geoghegan


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

pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: [COMMITTERS] pgsql: Fix misparsing of non-newline-terminated pg_hba.conf files.
Next
From: Peter Geoghegan
Date:
Subject: Re: [COMMITTERS] pgsql: Fix traversal of half-frozen update chains