Skip to content

Commit 43f8bc0

Browse files
authored
Start background workers on consistent state (#262)
Allows workers to start on hot standby.
1 parent 4670862 commit 43f8bc0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/clientauth.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ clientauth_init(void)
326326
shmem_startup_hook = clientauth_shmem_startup;
327327

328328
worker.bgw_flags = BGWORKER_SHMEM_ACCESS | BGWORKER_BACKEND_DATABASE_CONNECTION;
329-
worker.bgw_start_time = BgWorkerStart_RecoveryFinished;
329+
worker.bgw_start_time = BgWorkerStart_ConsistentState;
330330
worker.bgw_restart_time = 1;
331331
worker.bgw_notify_pid = 0;
332332
sprintf(worker.bgw_library_name, PG_TLE_EXTNAME);

src/passcheck.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ passcheck_check_password_hook(const char *username, const char *shadow_pass, Pas
286286
* 2. Spin up background worker.
287287
*/
288288
worker.bgw_flags = BGWORKER_SHMEM_ACCESS | BGWORKER_BACKEND_DATABASE_CONNECTION;
289-
worker.bgw_start_time = BgWorkerStart_RecoveryFinished;
289+
worker.bgw_start_time = BgWorkerStart_ConsistentState;
290290
worker.bgw_restart_time = 1;
291291
worker.bgw_notify_pid = MyProcPid;
292292
sprintf(worker.bgw_library_name, PG_TLE_EXTNAME);

0 commit comments

Comments
 (0)