aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2018-07-12 20:22:17 +0200
committerPeter Eisentraut <peter_e@gmx.net>2018-07-12 20:22:17 +0200
commit5e6e2c8773dd8e3037d9195452dc5e423367e1b0 (patch)
tree99015380f97fd068ee4a362735d95d46f9af9881 /src
parent632b4ae92dc6fb92149e94290760b50744e0bd35 (diff)
downloadpostgresql-5e6e2c8773dd8e3037d9195452dc5e423367e1b0.tar.gz
postgresql-5e6e2c8773dd8e3037d9195452dc5e423367e1b0.zip
Reset shmem_exit_inprogress after shmem_exit()
In ad9a274778d2d88c46b90309212b92ee7fdf9afe, shmem_exit_inprogress was introduced. But we need to reset it after shmem_exit(), because unlike the similar proc_exit(), shmem_exit() can also be called for cleanup when the process will not exit. Reported-by: Andrew Gierth <andrew@tao11.riddles.org.uk>
Diffstat (limited to 'src')
-rw-r--r--src/backend/storage/ipc/ipc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/backend/storage/ipc/ipc.c b/src/backend/storage/ipc/ipc.c
index 53f7c1e77ea..a85a1c6de5d 100644
--- a/src/backend/storage/ipc/ipc.c
+++ b/src/backend/storage/ipc/ipc.c
@@ -272,6 +272,8 @@ shmem_exit(int code)
on_shmem_exit_list[on_shmem_exit_index].function(code,
on_shmem_exit_list[on_shmem_exit_index].arg);
on_shmem_exit_index = 0;
+
+ shmem_exit_inprogress = false;
}
/* ----------------------------------------------------------------