Skip to content

Commit 6f82295

Browse files
committed
Use newly added InvalidCommandId instead of 0
The symbol was added by 71901ab; the original code was introduced by 6868ed7. Development of both overlapped which is why we apparently failed to notice. This is a (very slight) behavior change, so I'm not backpatching this to 9.4 for now, even though the symbol does exist there.
1 parent 832a12f commit 6f82295

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/backend/access/heap/heapam.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2818,7 +2818,7 @@ heap_delete(Relation relation, ItemPointer tid,
28182818
if (result == HeapTupleSelfUpdated)
28192819
hufd->cmax = HeapTupleHeaderGetCmax(tp.t_data);
28202820
else
2821-
hufd->cmax = 0; /* for lack of an InvalidCommandId value */
2821+
hufd->cmax = InvalidCommandId;
28222822
UnlockReleaseBuffer(buffer);
28232823
if (have_tuple_lock)
28242824
UnlockTupleTuplock(relation, &(tp.t_self), LockTupleExclusive);
@@ -3415,7 +3415,7 @@ heap_update(Relation relation, ItemPointer otid, HeapTuple newtup,
34153415
if (result == HeapTupleSelfUpdated)
34163416
hufd->cmax = HeapTupleHeaderGetCmax(oldtup.t_data);
34173417
else
3418-
hufd->cmax = 0; /* for lack of an InvalidCommandId value */
3418+
hufd->cmax = InvalidCommandId;
34193419
UnlockReleaseBuffer(buffer);
34203420
if (have_tuple_lock)
34213421
UnlockTupleTuplock(relation, &(oldtup.t_self), *lockmode);
@@ -4573,7 +4573,7 @@ heap_lock_tuple(Relation relation, HeapTuple tuple,
45734573
if (result == HeapTupleSelfUpdated)
45744574
hufd->cmax = HeapTupleHeaderGetCmax(tuple->t_data);
45754575
else
4576-
hufd->cmax = 0; /* for lack of an InvalidCommandId value */
4576+
hufd->cmax = InvalidCommandId;
45774577
LockBuffer(*buffer, BUFFER_LOCK_UNLOCK);
45784578
if (have_tuple_lock)
45794579
UnlockTupleTuplock(relation, tid, mode);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy