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/backup/backup_manifest.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/backend/backup/backup_manifest.c') diff --git a/src/backend/backup/backup_manifest.c b/src/backend/backup/backup_manifest.c index d05252f383c..dd76c9b0b63 100644 --- a/src/backend/backup/backup_manifest.c +++ b/src/backend/backup/backup_manifest.c @@ -242,7 +242,7 @@ AddWALInfoToBackupManifest(backup_manifest_info *manifest, XLogRecPtr startptr, * entry->end is InvalidXLogRecPtr, it means that the timeline has not * yet ended.) */ - if (!XLogRecPtrIsInvalid(entry->end) && entry->end < startptr) + if (XLogRecPtrIsValid(entry->end) && entry->end < startptr) continue; /* @@ -274,7 +274,7 @@ AddWALInfoToBackupManifest(backup_manifest_info *manifest, XLogRecPtr startptr, * better have arrived at the expected starting TLI. If not, * something's gone horribly wrong. */ - if (XLogRecPtrIsInvalid(entry->begin)) + if (!XLogRecPtrIsValid(entry->begin)) ereport(ERROR, errmsg("expected start timeline %u but found timeline %u", starttli, entry->tli)); -- cgit v1.2.3