]> granicus.if.org Git - postgresql/commit
Allow discovery of whether a dynamic background worker is running.
authorRobert Haas <rhaas@postgresql.org>
Wed, 28 Aug 2013 18:08:13 +0000 (14:08 -0400)
committerRobert Haas <rhaas@postgresql.org>
Wed, 28 Aug 2013 18:08:13 +0000 (14:08 -0400)
commit090d0f2050647958865cb495dff74af7257d2bb4
treebcebc38e72a0c90d8cf3c94d00b026e48887075e
parentc9e2e2db5c2090a880028fd8c1debff474640f50
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.
12 files changed:
contrib/worker_spi/worker_spi--1.0.sql
contrib/worker_spi/worker_spi.c
doc/src/sgml/bgworker.sgml
src/backend/commands/async.c
src/backend/postmaster/bgworker.c
src/backend/postmaster/postmaster.c
src/backend/storage/ipc/procsignal.c
src/include/miscadmin.h
src/include/postmaster/bgworker.h
src/include/postmaster/bgworker_internals.h
src/include/postmaster/postmaster.h
src/include/storage/procsignal.h