Hi all,
I noticed that contrib/worker_spi can't run as non-dynamic background
worker (IOW, load via shared_preload_libraries), because of
uninitialized bgw_notify_pid.
I got log lines below when starting PostgreSQL with
shared_preload_libraries = 'worker_spi'.
$ pg_ctl start -w
waiting for server to start....LOG: registering background worker "worker 1"
LOG: background worker "worker 1": only dynamic background workers
can request notification
LOG: registering background worker "worker 2"
LOG: background worker "worker 2": only dynamic background workers
can request notification
LOG: redirecting log output to logging collector process
HINT: Future log output will appear in directory "pg_log".
Attached patch fixes this issue. Please apply onto HEAD and 9.4.
--
Shigeru HANADA