File tree 1 file changed +6
-4
lines changed
src/backend/replication/logical 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -1262,6 +1262,12 @@ LogicalRepSyncTableStart(XLogRecPtr *origin_startpos)
1262
1262
relstate = GetSubscriptionRelState (MyLogicalRepWorker -> subid ,
1263
1263
MyLogicalRepWorker -> relid ,
1264
1264
& relstate_lsn );
1265
+
1266
+ /* Is the use of a password mandatory? */
1267
+ must_use_password = MySubscription -> passwordrequired &&
1268
+ !superuser_arg (MySubscription -> owner );
1269
+
1270
+ /* Note that the superuser_arg call can access the DB */
1265
1271
CommitTransactionCommand ();
1266
1272
1267
1273
SpinLockAcquire (& MyLogicalRepWorker -> relmutex );
@@ -1288,10 +1294,6 @@ LogicalRepSyncTableStart(XLogRecPtr *origin_startpos)
1288
1294
slotname ,
1289
1295
NAMEDATALEN );
1290
1296
1291
- /* Is the use of a password mandatory? */
1292
- must_use_password = MySubscription -> passwordrequired &&
1293
- !superuser_arg (MySubscription -> owner );
1294
-
1295
1297
/*
1296
1298
* Here we use the slot name instead of the subscription name as the
1297
1299
* application_name, so that it is different from the leader apply worker,
You can’t perform that action at this time.
0 commit comments