From a2b02293bc65dbb2401cb19c724f52c6ee0f2faf Mon Sep 17 00:00:00 2001 From: Álvaro Herrera Date: Thu, 6 Nov 2025 20:33:57 +0100 Subject: Use XLogRecPtrIsValid() in various places Now that commit 06edbed47862 has introduced XLogRecPtrIsValid(), we can use that instead of: - XLogRecPtrIsInvalid() - direct comparisons with InvalidXLogRecPtr - direct comparisons with literal 0 This makes the code more consistent. Author: Bertrand Drouvot Discussion: https://postgr.es/m/aQB7EvGqrbZXrMlg@ip-10-97-1-34.eu-west-3.compute.internal --- src/backend/access/transam/xlogwait.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/backend/access/transam/xlogwait.c') diff --git a/src/backend/access/transam/xlogwait.c b/src/backend/access/transam/xlogwait.c index e04567cfd67..6b4c1623e57 100644 --- a/src/backend/access/transam/xlogwait.c +++ b/src/backend/access/transam/xlogwait.c @@ -230,7 +230,7 @@ wakeupWaiters(WaitLSNType lsnType, XLogRecPtr currentLSN) /* Get procInfo using appropriate heap node */ procInfo = pairingheap_container(WaitLSNProcInfo, heapNode[i], node); - if (!XLogRecPtrIsInvalid(currentLSN) && procInfo->waitLSN > currentLSN) + if (XLogRecPtrIsValid(currentLSN) && procInfo->waitLSN > currentLSN) break; Assert(numWakeUpProcs < WAKEUP_PROC_STATIC_ARRAY_SIZE); -- cgit v1.2.3