aboutsummaryrefslogtreecommitdiff
path: root/src/backend/storage/ipc/ipc.c
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2014-03-10 10:17:19 -0400
committerRobert Haas <rhaas@postgresql.org>2014-03-10 10:17:19 -0400
commitcb9a0c7987466b130fbced01ab5d5481cf3a16df (patch)
tree930f14e0a5051d4e5cb80df023be1650cf250dd9 /src/backend/storage/ipc/ipc.c
parent77049443a1794bc5222aabb051476367fe347202 (diff)
downloadpostgresql-cb9a0c7987466b130fbced01ab5d5481cf3a16df.tar.gz
postgresql-cb9a0c7987466b130fbced01ab5d5481cf3a16df.zip
Teach on_exit_reset() to discard pending cleanups for dsm.
If a postmaster child invokes fork() and then calls on_exit_reset, that should be sufficient to let it exit() without breaking anything, but dynamic shared memory broke that by not updating on_exit_reset() to discard callbacks registered with dynamic shared memory segments. Per investigation of a complaint from Tom Lane.
Diffstat (limited to 'src/backend/storage/ipc/ipc.c')
-rw-r--r--src/backend/storage/ipc/ipc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/backend/storage/ipc/ipc.c b/src/backend/storage/ipc/ipc.c
index 9dc48c30b61..5dea0ed8ddb 100644
--- a/src/backend/storage/ipc/ipc.c
+++ b/src/backend/storage/ipc/ipc.c
@@ -400,4 +400,5 @@ on_exit_reset(void)
before_shmem_exit_index = 0;
on_shmem_exit_index = 0;
on_proc_exit_index = 0;
+ reset_on_dsm_detach();
}