From 75f70794adf53a95d32893f909c041809e249bf8 Mon Sep 17 00:00:00 2001 From: Bertrand Drouvot Date: Tue, 28 Oct 2025 06:39:26 +0000 Subject: [PATCH v1 17/20] make use of XLogRecPtrIsInvalid in walsender.c --- src/backend/replication/walsender.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 100.0% src/backend/replication/ diff --git a/src/backend/replication/walsender.c b/src/backend/replication/walsender.c index 548eafa7a73..622bb35e8c7 100644 --- a/src/backend/replication/walsender.c +++ b/src/backend/replication/walsender.c @@ -2397,7 +2397,7 @@ PhysicalConfirmReceivedLocation(XLogRecPtr lsn) bool changed = false; ReplicationSlot *slot = MyReplicationSlot; - Assert(lsn != InvalidXLogRecPtr); + Assert(!XLogRecPtrIsInvalid(lsn)); SpinLockAcquire(&slot->mutex); if (slot->data.restart_lsn != lsn) { @@ -2519,7 +2519,7 @@ ProcessStandbyReplyMessage(void) /* * Advance our local xmin horizon when the client confirmed a flush. */ - if (MyReplicationSlot && flushPtr != InvalidXLogRecPtr) + if (MyReplicationSlot && !XLogRecPtrIsInvalid(flushPtr)) { if (SlotIsLogical(MyReplicationSlot)) LogicalConfirmReceivedLocation(flushPtr); @@ -3536,7 +3536,7 @@ XLogSendLogical(void) * If first time through in this session, initialize flushPtr. Otherwise, * we only need to update flushPtr if EndRecPtr is past it. */ - if (flushPtr == InvalidXLogRecPtr || + if (XLogRecPtrIsInvalid(flushPtr) || logical_decoding_ctx->reader->EndRecPtr >= flushPtr) { /* -- 2.34.1