From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Peter Geoghegan <pg@bowt.ie>
Cc: pgsql-hackers@postgresql.org
Subject: Re: [COMMITTERS] pgsql: Fix traversal of half-frozen update chains
Date: Fri, 13 Oct 2017 01:31:52 +0200
Message-ID: <20171012233152.kyk5vtccs32enk5c@alvherre.pgsql> (raw)
In-Reply-To: <CAH2-WzkEc2Ske68sf5u0pdm8L0cQyUV+YApGUFsEOAmfxPvZ4w@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
Peter Geoghegan wrote:
> On Fri, Oct 6, 2017 at 8:29 AM, Alvaro Herrera <alvherre@alvh.no-ip.org> wrote:
> > /*
> > * When a tuple is frozen, the original Xmin is lost, but we know it's a
> > * committed transaction. So unless the Xmax is InvalidXid, we don't know
> > * for certain that there is a match, but there may be one; and we must
> > * return true so that a HOT chain that is half-frozen can be walked
> > * correctly.
> > *
> > * We no longer freeze tuples this way, but we must keep this in order to
> > * interpret pre-pg_upgrade pages correctly.
> > */
> > if (TransactionIdEquals(xmin, FrozenTransactionId) &&
> > TransactionIdIsValid(xmax))
> > return true;
> >
> > return false;
> > }
>
> 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.
Yes, agreed, I should change that. Thanks for continuing to think about
this.
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: alvherre@alvh.no-ip.org, pg@bowt.ie, pgsql-hackers@postgresql.org
Subject: Re: [COMMITTERS] pgsql: Fix traversal of half-frozen update chains
In-Reply-To: <20171012233152.kyk5vtccs32enk5c@alvherre.pgsql>
References: <CAH2-WzkEc2Ske68sf5u0pdm8L0cQyUV+YApGUFsEOAmfxPvZ4w@mail.gmail.com> <20171012233152.kyk5vtccs32enk5c@alvherre.pgsql>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox