Replace occurrences of InvalidXid with InvalidTransactionId
authorDaniel Gustafsson <[email protected]>
Mon, 4 Oct 2021 08:31:01 +0000 (10:31 +0200)
committerDaniel Gustafsson <[email protected]>
Mon, 4 Oct 2021 08:31:01 +0000 (10:31 +0200)
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 <[email protected]>
Discussion: https://postgr.es/m/CALj2ACUQzdigML868nV4cojfELPkEzNLNOk7b91Pho4JB90fng@mail.gmail.com

src/backend/access/heap/heapam.c
src/backend/utils/time/snapmgr.c

index 2a264c6ac1f3282f7b22754bd919ad7180c2c36b..2da2be16969fc710dc32701bbd936061768738cc 100644 (file)
@@ -3589,9 +3589,9 @@ l2:
    /*
     * And also prepare an Xmax value for the new copy of the tuple.  If there
     * was no xmax previously, or there was one but all lockers are now gone,
-    * then use InvalidXid; otherwise, get the xmax from the old tuple.  (In
-    * rare cases that might also be InvalidXid and yet not have the
-    * HEAP_XMAX_INVALID bit set; that's fine.)
+    * then use InvalidTransactionId; otherwise, get the xmax from the old
+    * tuple.  (In rare cases that might also be InvalidTransactionId and yet
+    * not have the HEAP_XMAX_INVALID bit set; that's fine.)
     */
    if ((oldtup.t_data->t_infomask & HEAP_XMAX_INVALID) ||
        HEAP_LOCKED_UPGRADED(oldtup.t_data->t_infomask) ||
index dca1bc8afca6e4f52e1bf3a3fda7c7f00fca4a1a..5001efdf7a2343c0c84d4820f2129528baf361cd 100644 (file)
@@ -919,9 +919,9 @@ xmin_cmp(const pairingheap_node *a, const pairingheap_node *b, void *arg)
 /*
  * SnapshotResetXmin
  *
- * If there are no more snapshots, we can reset our PGPROC->xmin to InvalidXid.
- * Note we can do this without locking because we assume that storing an Xid
- * is atomic.
+ * If there are no more snapshots, we can reset our PGPROC->xmin to
+ * InvalidTransactionId. Note we can do this without locking because we assume
+ * that storing an Xid is atomic.
  *
  * Even if there are some remaining snapshots, we may be able to advance our
  * PGPROC->xmin to some degree.  This typically happens when a portal is