summaryrefslogtreecommitdiff
path: root/src/backend/access/transam/xlogbackup.c
diff options
context:
space:
mode:
authorÁlvaro Herrera <alvherre@kurilemu.de>2025-11-06 20:33:57 +0100
committerÁlvaro Herrera <alvherre@kurilemu.de>2025-11-06 20:33:57 +0100
commita2b02293bc65dbb2401cb19c724f52c6ee0f2faf (patch)
treef982dafa5b106905027b0e11fe9cdee9fc0bab6f /src/backend/access/transam/xlogbackup.c
parent06edbed478625829b19c35d0c17d805be588afa6 (diff)
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 <bertranddrouvot.pg@gmail.com> Discussion: https://postgr.es/m/aQB7EvGqrbZXrMlg@ip-10-97-1-34.eu-west-3.compute.internal
Diffstat (limited to 'src/backend/access/transam/xlogbackup.c')
-rw-r--r--src/backend/access/transam/xlogbackup.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/access/transam/xlogbackup.c b/src/backend/access/transam/xlogbackup.c
index 8a8a2a7b326..e88df682932 100644
--- a/src/backend/access/transam/xlogbackup.c
+++ b/src/backend/access/transam/xlogbackup.c
@@ -79,8 +79,8 @@ build_backup_content(BackupState *state, bool ishistoryfile)
}
/* either both istartpoint and istarttli should be set, or neither */
- Assert(XLogRecPtrIsInvalid(state->istartpoint) == (state->istarttli == 0));
- if (!XLogRecPtrIsInvalid(state->istartpoint))
+ Assert(XLogRecPtrIsValid(state->istartpoint) == (state->istarttli != 0));
+ if (XLogRecPtrIsValid(state->istartpoint))
{
appendStringInfo(&result, "INCREMENTAL FROM LSN: %X/%08X\n",
LSN_FORMAT_ARGS(state->istartpoint));