mirror of
https://github.com/postgres/postgres.git
synced 2025-07-30 11:03:19 +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:
@ -445,7 +445,7 @@ autoprewarm_database_main(Datum main_arg)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
|
||||
errmsg("could not map dynamic shared memory segment")));
|
||||
BackgroundWorkerInitializeConnectionByOid(apw_state->database, InvalidOid);
|
||||
BackgroundWorkerInitializeConnectionByOid(apw_state->database, InvalidOid, 0);
|
||||
block_info = (BlockInfoRecord *) dsm_segment_address(seg);
|
||||
pos = apw_state->prewarm_start_idx;
|
||||
|
||||
|
Reference in New Issue
Block a user