Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4761667

Browse files
committed
Wait 1 second before restarting the bgworker.
If for some reason the bgworker keeps crashing, this will limit the amount of traces logged when restarting.
1 parent 609975a commit 4761667

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

collector.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ register_wait_collector(void)
4444
memset(&worker, 0, sizeof(worker));
4545
worker.bgw_flags = BGWORKER_SHMEM_ACCESS;
4646
worker.bgw_start_time = BgWorkerStart_ConsistentState;
47-
worker.bgw_restart_time = 0;
47+
worker.bgw_restart_time = 1;
4848
worker.bgw_notify_pid = 0;
4949
snprintf(worker.bgw_library_name, BGW_MAXLEN, "pg_wait_sampling");
5050
snprintf(worker.bgw_function_name, BGW_MAXLEN, CppAsString(collector_main));

0 commit comments

Comments
 (0)