aboutsummaryrefslogtreecommitdiff
path: root/src/backend/replication/logical/worker.c
diff options
context:
space:
mode:
authorMagnus Hagander <magnus@hagander.net>2018-04-05 18:59:32 +0200
committerMagnus Hagander <magnus@hagander.net>2018-04-05 19:02:45 +0200
commiteed1ce72e1593d3e8b7461d7744808d4d6bf402b (patch)
tree19b57473d3ac769d9e03562924a2ab33ab0bc6b0 /src/backend/replication/logical/worker.c
parent1664ae1978bf0f5ee940dc2fc8313e6400a7e7da (diff)
downloadpostgresql-eed1ce72e1593d3e8b7461d7744808d4d6bf402b.tar.gz
postgresql-eed1ce72e1593d3e8b7461d7744808d4d6bf402b.zip
Allow background workers to bypass datallowconn
THis adds a "flags" field to the BackgroundWorkerInitializeConnection() and BackgroundWorkerInitializeConnectionByOid(). For now only one flag, BGWORKER_BYPASS_ALLOWCONN, is defined, which allows the worker to ignore datallowconn.
Diffstat (limited to 'src/backend/replication/logical/worker.c')
-rw-r--r--src/backend/replication/logical/worker.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/backend/replication/logical/worker.c b/src/backend/replication/logical/worker.c
index fdace7eea2b..93a42d9322c 100644
--- a/src/backend/replication/logical/worker.c
+++ b/src/backend/replication/logical/worker.c
@@ -1544,7 +1544,8 @@ ApplyWorkerMain(Datum main_arg)
/* Connect to our database. */
BackgroundWorkerInitializeConnectionByOid(MyLogicalRepWorker->dbid,
- MyLogicalRepWorker->userid);
+ MyLogicalRepWorker->userid,
+ 0);
/* Load the subscription into persistent memory context. */
ApplyContext = AllocSetContextCreate(TopMemoryContext,