pgsql: Allow discovery of whether a dynamic background worker is runnin

From: Robert Haas <rhaas(at)postgresql(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Allow discovery of whether a dynamic background worker is runnin
Date: 2013-08-28 18:14:21
Message-ID: E1VEkG5-0002VW-I4@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Heikki Linnakangas 2013-08-29 11:06:05 pgsql: Use a non-locking initial test in TAS_SPIN on x86_64.
Previous Message Robert Haas 2013-08-28 17:24:23 pgsql: Partially restore comments discussing enum renumbering hazards.