aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/pg_upgrade_support.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/utils/adt/pg_upgrade_support.c')
-rw-r--r--src/backend/utils/adt/pg_upgrade_support.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/backend/utils/adt/pg_upgrade_support.c b/src/backend/utils/adt/pg_upgrade_support.c
index 2f6fc86c3df..92921b0239d 100644
--- a/src/backend/utils/adt/pg_upgrade_support.c
+++ b/src/backend/utils/adt/pg_upgrade_support.c
@@ -281,11 +281,11 @@ binary_upgrade_logical_slot_has_caught_up(PG_FUNCTION_ARGS)
CHECK_IS_BINARY_UPGRADE;
- /* We must check before dereferencing the argument */
- if (PG_ARGISNULL(0))
- elog(ERROR, "null argument to binary_upgrade_validate_wal_records is not allowed");
-
- CheckSlotPermissions();
+ /*
+ * Binary upgrades only allowed super-user connections so we must have
+ * permission to use replication slots.
+ */
+ Assert(has_rolreplication(GetUserId()));
slot_name = PG_GETARG_NAME(0);