summaryrefslogtreecommitdiff
path: root/src/backend/commands
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/commands')
-rw-r--r--src/backend/commands/subscriptioncmds.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/backend/commands/subscriptioncmds.c b/src/backend/commands/subscriptioncmds.c
index 3d29818badd..2b0c0ca8d05 100644
--- a/src/backend/commands/subscriptioncmds.c
+++ b/src/backend/commands/subscriptioncmds.c
@@ -393,7 +393,7 @@ parse_subscription_options(ParseState *pstate, List *stmt_options,
lsn = DatumGetLSN(DirectFunctionCall1(pg_lsn_in,
CStringGetDatum(lsn_str)));
- if (XLogRecPtrIsInvalid(lsn))
+ if (!XLogRecPtrIsValid(lsn))
ereport(ERROR,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
errmsg("invalid WAL location (LSN): %s", lsn_str)));
@@ -1895,7 +1895,7 @@ AlterSubscription(ParseState *pstate, AlterSubscriptionStmt *stmt,
* If the user sets subskiplsn, we do a sanity check to make
* sure that the specified LSN is a probable value.
*/
- if (!XLogRecPtrIsInvalid(opts.lsn))
+ if (XLogRecPtrIsValid(opts.lsn))
{
RepOriginId originid;
char originname[NAMEDATALEN];
@@ -1907,7 +1907,7 @@ AlterSubscription(ParseState *pstate, AlterSubscriptionStmt *stmt,
remote_lsn = replorigin_get_progress(originid, false);
/* Check the given LSN is at least a future LSN */
- if (!XLogRecPtrIsInvalid(remote_lsn) && opts.lsn < remote_lsn)
+ if (XLogRecPtrIsValid(remote_lsn) && opts.lsn < remote_lsn)
ereport(ERROR,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
errmsg("skip WAL location (LSN %X/%08X) must be greater than origin LSN %X/%08X",