Allow discovery of whether a dynamic background worker is running.
Using the infrastructure provided by this patch, it's possible either
to wait for the startup of a dynamically-registered background worker,
or to poll the status of such a worker without waiting. In either
case, the current PID of the worker process can also be obtained.
As usual, worker_spi is updated to demonstrate the new functionality.
Patch by me. Review by Andres Freund.
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/090d0f2050647958865cb495dff74af7257d2bb4
Modified Files
--------------
contrib/worker_spi/worker_spi--1.0.sql | 2 +-
contrib/worker_spi/worker_spi.c | 26 +++-
doc/src/sgml/bgworker.sgml | 54 ++++++-
src/backend/commands/async.c | 2 -
src/backend/postmaster/bgworker.c | 206 ++++++++++++++++++++++++++-
src/backend/postmaster/postmaster.c | 52 +++++++
src/backend/storage/ipc/procsignal.c | 12 ++
src/include/miscadmin.h | 2 +
src/include/postmaster/bgworker.h | 21 ++-
src/include/postmaster/bgworker_internals.h | 2 +
src/include/postmaster/postmaster.h | 1 +
src/include/storage/procsignal.h | 1 +
12 files changed, 368 insertions(+), 13 deletions(-)