From 090d0f2050647958865cb495dff74af7257d2bb4 Mon Sep 17 00:00:00 2001 From: Robert Haas Date: Wed, 28 Aug 2013 14:08:13 -0400 Subject: 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. --- src/include/miscadmin.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/include/miscadmin.h') diff --git a/src/include/miscadmin.h b/src/include/miscadmin.h index edced29f516..0aa540a08ef 100644 --- a/src/include/miscadmin.h +++ b/src/include/miscadmin.h @@ -28,6 +28,8 @@ #define PG_BACKEND_VERSIONSTR "postgres (PostgreSQL) " PG_VERSION "\n" +#define InvalidPid (-1) + /***************************************************************************** * System interrupt and critical section handling -- cgit v1.2.3