mirror of
https://github.com/postgres/postgres.git
synced 2025-06-30 21:42: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:
@ -901,7 +901,7 @@ ApplyLauncherMain(Datum main_arg)
|
||||
* Establish connection to nailed catalogs (we only ever access
|
||||
* pg_subscription).
|
||||
*/
|
||||
BackgroundWorkerInitializeConnection(NULL, NULL);
|
||||
BackgroundWorkerInitializeConnection(NULL, NULL, 0);
|
||||
|
||||
/* Enter main loop */
|
||||
for (;;)
|
||||
|
@ -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,
|
||||
|
Reference in New Issue
Block a user