From 81f495d7c2739fe00e521b6bb191b8df4cf8ef4f Mon Sep 17 00:00:00 2001
From: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Date: Tue, 28 Oct 2025 06:41:06 +0000
Subject: [PATCH v1 18/20] make use of XLogRecPtrIsInvalid in pg_receivewal.c

---
 src/bin/pg_basebackup/pg_receivewal.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
 100.0% src/bin/pg_basebackup/

diff --git a/src/bin/pg_basebackup/pg_receivewal.c b/src/bin/pg_basebackup/pg_receivewal.c
index 289ca14dcfe..0cebdbca6c3 100644
--- a/src/bin/pg_basebackup/pg_receivewal.c
+++ b/src/bin/pg_basebackup/pg_receivewal.c
@@ -535,7 +535,7 @@ StreamLog(void)
 	 * Figure out where to start streaming.  First scan the local directory.
 	 */
 	stream.startpos = FindStreamingStart(&stream.timeline);
-	if (stream.startpos == InvalidXLogRecPtr)
+	if (XLogRecPtrIsInvalid(stream.startpos))
 	{
 		/*
 		 * Try to get the starting point from the slot if any.  This is
@@ -556,14 +556,14 @@ StreamLog(void)
 		 * If it the starting point is still not known, use the current WAL
 		 * flush value as last resort.
 		 */
-		if (stream.startpos == InvalidXLogRecPtr)
+		if (XLogRecPtrIsInvalid(stream.startpos))
 		{
 			stream.startpos = serverpos;
 			stream.timeline = servertli;
 		}
 	}
 
-	Assert(stream.startpos != InvalidXLogRecPtr &&
+	Assert(!XLogRecPtrIsInvalid(stream.startpos) &&
 		   stream.timeline != 0);
 
 	/*
-- 
2.34.1

