Skip to content

Commit 616afee

Browse files
committed
worker_spi: Initialize bgw_notify_pid in all cases.
Commit 090d0f2 added new code showing how it can be useful to set bgw_notify_pid to a non-zero value, but it failed to make sure that the existing call to RegisterBackgroundWorker initialized the new field at all. Report and patch by Shigeru Hanada.
1 parent 9d7ded0 commit 616afee

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

contrib/worker_spi/worker_spi.c

+1
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,7 @@ _PG_init(void)
348348
worker.bgw_start_time = BgWorkerStart_RecoveryFinished;
349349
worker.bgw_restart_time = BGW_NEVER_RESTART;
350350
worker.bgw_main = worker_spi_main;
351+
worker.bgw_notify_pid = 0;
351352

352353
/*
353354
* Now fill in worker-specific data, and do the actual registrations.

0 commit comments

Comments
 (0)