1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-25 01:02:05 +03:00

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.
This commit is contained in:
Magnus Hagander
2018-04-05 18:59:32 +02:00
parent 1664ae1978
commit eed1ce72e1
11 changed files with 25 additions and 20 deletions

View File

@ -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,