HeapTupleHeaderAdjustCmax made the incorrect assumption that the raw
authorHeikki Linnakangas <heikki@enterprisedb.com>
Mon, 1 Sep 2008 18:53:03 +0000 (18:53 +0000)
committerHeikki Linnakangas <heikki@enterprisedb.com>
Mon, 1 Sep 2008 18:53:03 +0000 (18:53 +0000)
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.

src/backend/utils/time/combocid.c

index cc130806edbafeee0eca24cc58d1d32b465f2c00..cadd7233ca243a5650667afd1d95f43e3ba9cee7 100644 (file)
@@ -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;