Skip to content

Commit 941921b

Browse files
Replace occurrences of InvalidXid with InvalidTransactionId
While Xid is a known shortening of TransactionId, InvalidXid is not defined in the code. Fix comments which mistakenly were using the shorter version. Author: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com> Discussion: https://postgr.es/m/CALj2ACUQzdigML868nV4cojfELPkEzNLNOk7b91Pho4JB90fng@mail.gmail.com
1 parent 8a42379 commit 941921b

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/backend/access/heap/heapam.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3589,9 +3589,9 @@ heap_update(Relation relation, ItemPointer otid, HeapTuple newtup,
35893589
/*
35903590
* And also prepare an Xmax value for the new copy of the tuple. If there
35913591
* was no xmax previously, or there was one but all lockers are now gone,
3592-
* then use InvalidXid; otherwise, get the xmax from the old tuple. (In
3593-
* rare cases that might also be InvalidXid and yet not have the
3594-
* HEAP_XMAX_INVALID bit set; that's fine.)
3592+
* then use InvalidTransactionId; otherwise, get the xmax from the old
3593+
* tuple. (In rare cases that might also be InvalidTransactionId and yet
3594+
* not have the HEAP_XMAX_INVALID bit set; that's fine.)
35953595
*/
35963596
if ((oldtup.t_data->t_infomask & HEAP_XMAX_INVALID) ||
35973597
HEAP_LOCKED_UPGRADED(oldtup.t_data->t_infomask) ||

src/backend/utils/time/snapmgr.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -919,9 +919,9 @@ xmin_cmp(const pairingheap_node *a, const pairingheap_node *b, void *arg)
919919
/*
920920
* SnapshotResetXmin
921921
*
922-
* If there are no more snapshots, we can reset our PGPROC->xmin to InvalidXid.
923-
* Note we can do this without locking because we assume that storing an Xid
924-
* is atomic.
922+
* If there are no more snapshots, we can reset our PGPROC->xmin to
923+
* InvalidTransactionId. Note we can do this without locking because we assume
924+
* that storing an Xid is atomic.
925925
*
926926
* Even if there are some remaining snapshots, we may be able to advance our
927927
* PGPROC->xmin to some degree. This typically happens when a portal is

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