From: Peter Eisentraut Date: Thu, 12 Jul 2018 18:22:17 +0000 (+0200) Subject: Reset shmem_exit_inprogress after shmem_exit() X-Git-Tag: REL_12_BETA1~1884 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5e6e2c8773dd8e3037d9195452dc5e423367e1b0;p=thirdparty%2Fpostgresql.git 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 --- 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; } /* ----------------------------------------------------------------