From: Heikki Linnakangas Date: Mon, 1 Sep 2008 18:52:45 +0000 (+0000) Subject: HeapTupleHeaderAdjustCmax made the incorrect assumption that the raw X-Git-Tag: REL8_4_BETA1~1028 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9ac4299163247645c6e391f5f65735c6cb78ccb9;p=postgresql HeapTupleHeaderAdjustCmax made the incorrect assumption that the raw command id is the cmin, when it can in fact be a combo cid. That made rows incorrectly invisible to a transaction where a tuple was deleted by multiple aborted subtransactions. Report and patch Karl Schnaitter. Back-patch to 8.3, where combo cids was introduced. --- diff --git a/src/backend/utils/time/combocid.c b/src/backend/utils/time/combocid.c index 815b961e69..fb50176078 100644 --- a/src/backend/utils/time/combocid.c +++ b/src/backend/utils/time/combocid.c @@ -34,7 +34,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/utils/time/combocid.c,v 1.4 2008/01/01 19:45:55 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/utils/time/combocid.c,v 1.5 2008/09/01 18:52:45 heikki Exp $ * *------------------------------------------------------------------------- */ @@ -155,7 +155,7 @@ HeapTupleHeaderAdjustCmax(HeapTupleHeader tup, if (!(tup->t_infomask & HEAP_XMIN_COMMITTED) && TransactionIdIsCurrentTransactionId(HeapTupleHeaderGetXmin(tup))) { - CommandId cmin = HeapTupleHeaderGetRawCommandId(tup); + CommandId cmin = HeapTupleHeaderGetCmin(tup); *cmax = GetComboCommandId(cmin, *cmax); *iscombo = true;