summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeikki Linnakangas2008-09-01 18:52:45 +0000
committerHeikki Linnakangas2008-09-01 18:52:45 +0000
commit9ac4299163247645c6e391f5f65735c6cb78ccb9 (patch)
tree02dcbdb6a4db7dd801aa13a8190a1d079b8baa43
parent86ec73b90932dd22e9e6c2333f1322130c4e1690 (diff)
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.
-rw-r--r--src/backend/utils/time/combocid.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/utils/time/combocid.c b/src/backend/utils/time/combocid.c
index 815b961e69c..fb501760789 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;