Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9ac4299

Browse files
committed
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.
1 parent 86ec73b commit 9ac4299

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/backend/utils/time/combocid.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
* Portions Copyright (c) 1994, Regents of the University of California
3535
*
3636
* IDENTIFICATION
37-
* $PostgreSQL: pgsql/src/backend/utils/time/combocid.c,v 1.4 2008/01/01 19:45:55 momjian Exp $
37+
* $PostgreSQL: pgsql/src/backend/utils/time/combocid.c,v 1.5 2008/09/01 18:52:45 heikki Exp $
3838
*
3939
*-------------------------------------------------------------------------
4040
*/
@@ -155,7 +155,7 @@ HeapTupleHeaderAdjustCmax(HeapTupleHeader tup,
155155
if (!(tup->t_infomask & HEAP_XMIN_COMMITTED) &&
156156
TransactionIdIsCurrentTransactionId(HeapTupleHeaderGetXmin(tup)))
157157
{
158-
CommandId cmin = HeapTupleHeaderGetRawCommandId(tup);
158+
CommandId cmin = HeapTupleHeaderGetCmin(tup);
159159

160160
*cmax = GetComboCommandId(cmin, *cmax);
161161
*iscombo = true;

0 commit comments

Comments
 (0)