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/heap/vacuumlazy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/backend/access/heap/vacuumlazy.c') diff --git a/src/backend/access/heap/vacuumlazy.c b/src/backend/access/heap/vacuumlazy.c index 61fe623cc60..deb9a3dc0d1 100644 --- a/src/backend/access/heap/vacuumlazy.c +++ b/src/backend/access/heap/vacuumlazy.c @@ -1901,7 +1901,7 @@ lazy_scan_new_or_empty(LVRelState *vacrel, Buffer buf, BlockNumber blkno, * WAL-logged, and if not, do that now. */ if (RelationNeedsWAL(vacrel->rel) && - PageGetLSN(page) == InvalidXLogRecPtr) + !XLogRecPtrIsValid(PageGetLSN(page))) log_newpage_buffer(buf, true); PageSetAllVisible(page); -- cgit v1.2.3