summaryrefslogtreecommitdiff
path: root/src/include/miscadmin.h
diff options
context:
space:
mode:
authorRobert Haas2013-08-28 18:08:13 +0000
committerRobert Haas2013-08-28 18:08:13 +0000
commit090d0f2050647958865cb495dff74af7257d2bb4 (patch)
treebcebc38e72a0c90d8cf3c94d00b026e48887075e /src/include/miscadmin.h
parentc9e2e2db5c2090a880028fd8c1debff474640f50 (diff)
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.
Diffstat (limited to 'src/include/miscadmin.h')
-rw-r--r--src/include/miscadmin.h2
1 files changed, 2 insertions, 0 deletions
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