From eed1ce72e1593d3e8b7461d7744808d4d6bf402b Mon Sep 17 00:00:00 2001 From: Magnus Hagander Date: Thu, 5 Apr 2018 18:59:32 +0200 Subject: 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. --- src/backend/access/transam/parallel.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/backend/access/transam/parallel.c') diff --git a/src/backend/access/transam/parallel.c b/src/backend/access/transam/parallel.c index 9d4efc0f8fc..1d631b72755 100644 --- a/src/backend/access/transam/parallel.c +++ b/src/backend/access/transam/parallel.c @@ -1324,7 +1324,8 @@ ParallelWorkerMain(Datum main_arg) /* Restore database connection. */ BackgroundWorkerInitializeConnectionByOid(fps->database_id, - fps->authenticated_user_id); + fps->authenticated_user_id, + 0); /* * Set the client encoding to the database encoding, since that is what -- cgit v1.2.3