From: Heikki Linnakangas Date: Mon, 1 Sep 2008 18:53:03 +0000 (+0000) Subject: HeapTupleHeaderAdjustCmax made the incorrect assumption that the raw X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=9124700b65b2904023196799b2cd3d81d1433e71;p=users%2Fbernd%2Fpostgres.git 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 cc130806ed..cadd7233ca 100644 --- a/src/backend/utils/time/combocid.c +++ b/src/backend/utils/time/combocid.c @@ -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;