agora inbox for [email protected]  
help / color / mirror / Atom feed
From: Bertrand Drouvot <[email protected]>
Subject: [PATCH v1] Fix other cases of literal 0 instead of InvalidXLogRecPtr assignment
Date: Fri, 30 Jan 2026 07:50:36 +0000

Those ones were missed in ec317440716.

Author: Bertrand Drouvot <[email protected]>
Discussion: https://postgr.es/m/[email protected]
---
 src/backend/access/transam/xact.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
 100.0% src/backend/access/transam/

diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c
index eba4f063168..7e3dc3f9386 100644
--- a/src/backend/access/transam/xact.c
+++ b/src/backend/access/transam/xact.c
@@ -1573,7 +1573,7 @@ RecordTransactionCommit(void)
 	XactLastCommitEnd = XactLastRecEnd;
 
 	/* Reset XactLastRecEnd until the next transaction writes something */
-	XactLastRecEnd = 0;
+	XactLastRecEnd = InvalidXLogRecPtr;
 cleanup:
 	/* Clean up local data */
 	if (rels)
@@ -1787,7 +1787,7 @@ RecordTransactionAbort(bool isSubXact)
 	{
 		/* Reset XactLastRecEnd until the next transaction writes something */
 		if (!isSubXact)
-			XactLastRecEnd = 0;
+			XactLastRecEnd = InvalidXLogRecPtr;
 		return InvalidTransactionId;
 	}
 
@@ -1879,7 +1879,7 @@ RecordTransactionAbort(bool isSubXact)
 
 	/* Reset XactLastRecEnd until the next transaction writes something */
 	if (!isSubXact)
-		XactLastRecEnd = 0;
+		XactLastRecEnd = InvalidXLogRecPtr;
 
 	/* And clean up local data */
 	if (rels)
@@ -2701,7 +2701,7 @@ PrepareTransaction(void)
 	 */
 
 	/* Reset XactLastRecEnd until the next transaction writes something */
-	XactLastRecEnd = 0;
+	XactLastRecEnd = InvalidXLogRecPtr;
 
 	/*
 	 * Transfer our locks to a dummy PGPROC.  This has to be done before
-- 
2.34.1


--31r/W+W8Qcw0VOW+--






view thread (5+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected]
  Subject: Re: [PATCH v1] Fix other cases of literal 0 instead of InvalidXLogRecPtr assignment
  In-Reply-To: <no-message-id-77400@localhost>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox