aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2014-05-26 22:56:28 -0400
committerRobert Haas <rhaas@postgresql.org>2014-05-26 22:56:28 -0400
commit616afee14d7e8d6690286aaf8a2a0a01168c378a (patch)
treef4adc4c6a805fb0ebb305f3d20ab4e19a0a8dda2
parent9d7ded0f4277f5c0063eca8e871a34e2355a8371 (diff)
downloadpostgresql-616afee14d7e8d6690286aaf8a2a0a01168c378a.tar.gz
postgresql-616afee14d7e8d6690286aaf8a2a0a01168c378a.zip
worker_spi: Initialize bgw_notify_pid in all cases.
Commit 090d0f2050647958865cb495dff74af7257d2bb4 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.
-rw-r--r--contrib/worker_spi/worker_spi.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/contrib/worker_spi/worker_spi.c b/contrib/worker_spi/worker_spi.c
index db25ecd2d98..829de0e6a7f 100644
--- a/contrib/worker_spi/worker_spi.c
+++ b/contrib/worker_spi/worker_spi.c
@@ -348,6 +348,7 @@ _PG_init(void)
worker.bgw_start_time = BgWorkerStart_RecoveryFinished;
worker.bgw_restart_time = BGW_NEVER_RESTART;
worker.bgw_main = worker_spi_main;
+ worker.bgw_notify_pid = 0;
/*
* Now fill in worker-specific data, and do the actual registrations.