aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/init/globals.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/utils/init/globals.c')
-rw-r--r--src/backend/utils/init/globals.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/backend/utils/init/globals.c b/src/backend/utils/init/globals.c
index dc5c8d684a7..c35867bcfe9 100644
--- a/src/backend/utils/init/globals.c
+++ b/src/backend/utils/init/globals.c
@@ -41,6 +41,15 @@ long MyCancelKey;
int MyPMChildSlot;
/*
+ * MyLatch points to the latch that should be used for signal handling by the
+ * current process. It will either point to a process local latch if the
+ * current process does not have a PGPROC entry in that moment, or to
+ * PGPROC->procLatch if it has. Thus it can always be used in signal handlers,
+ * without checking for its existence.
+ */
+struct Latch *MyLatch;
+
+/*
* DataDir is the absolute path to the top level of the PGDATA directory tree.
* Except during early startup, this is also the server's working directory;
* most code therefore can simply use relative paths and not reference DataDir