pgsql: Compare Xmin to previous Xmax when locking an update chain

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Compare Xmin to previous Xmax when locking an update chain
Date: 2013-11-28 15:02:30
Message-ID: E1Vm36s-00022V-Bp@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Compare Xmin to previous Xmax when locking an update chain

Not doing so causes us to traverse an update chain that has been broken
by concurrent page pruning. All other code that traverses update chains
uses this check as one of the cases in which to stop iterating, so
replicate it here too. Failure to do so leads to erroneous CLOG,
subtrans or multixact lookups.

Per discussion following the bug report by J Smith in
CADFUPgc5bmtv-yg9znxV-vcfkb+JPRqs7m2OesQXaM_4Z1JpdQ(at)mail(dot)gmail(dot)com
as diagnosed by Andres Freund.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/e4828e9ccba731178dd77aed078db7ceb0e1e8d1

Modified Files
--------------
src/backend/access/heap/heapam.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)

Browse pgsql-committers by date

  From Date Subject
Next Message Alvaro Herrera 2013-11-28 16:02:38 pgsql: Unbreak buildfarm
Previous Message Peter Eisentraut 2013-11-28 03:42:26 pgsql: doc: Set chunk.first.sections in XSLT, for consistency with DSSS