summaryrefslogtreecommitdiff
path: root/src/backend/storage/ipc
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/storage/ipc')
-rw-r--r--src/backend/storage/ipc/ipc.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/backend/storage/ipc/ipc.c b/src/backend/storage/ipc/ipc.c
index 2de35efbd4f..726db7b7f1b 100644
--- a/src/backend/storage/ipc/ipc.c
+++ b/src/backend/storage/ipc/ipc.c
@@ -40,6 +40,11 @@
bool proc_exit_inprogress = false;
/*
+ * Set when shmem_exit() is in progress.
+ */
+bool shmem_exit_inprogress = false;
+
+/*
* This flag tracks whether we've called atexit() in the current process
* (or in the parent postmaster).
*/
@@ -214,6 +219,8 @@ proc_exit_prepare(int code)
void
shmem_exit(int code)
{
+ shmem_exit_inprogress = true;
+
/*
* Call before_shmem_exit callbacks.
*