aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/gist
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2020-09-11 12:20:16 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2020-09-11 12:20:16 -0400
commit6693a96b329ec46f1df916f2a28d640cc9a9977d (patch)
tree919e9d30ef14acf14d1ee6a140cccd4a052a1c1c /src/backend/access/gist
parent6a68a233cef86d81b35fb4c1c21a094768875af2 (diff)
downloadpostgresql-6693a96b329ec46f1df916f2a28d640cc9a9977d.tar.gz
postgresql-6693a96b329ec46f1df916f2a28d640cc9a9977d.zip
Don't run atexit callbacks during signal exits from ProcessStartupPacket.
Although 58c6feccf fixed the case for SIGQUIT, we were still calling proc_exit() from signal handlers for SIGTERM and timeout failures in ProcessStartupPacket. Fortunately, at the point where that code runs, we haven't yet connected to shared memory in any meaningful way, so there is nothing we need to undo in shared memory. This means it should be safe to use _exit(1) here, ie, not run any atexit handlers but also inform the postmaster that it's not a crash exit. To make sure nobody breaks the "nothing to undo" expectation, add a cross-check that no on-shmem-exit or before-shmem-exit handlers have been registered yet when we finish using these signal handlers. This change is simple enough that maybe it could be back-patched, but I won't risk that right now. Discussion: https://postgr.es/m/1850884.1599601164@sss.pgh.pa.us
Diffstat (limited to 'src/backend/access/gist')
0 files changed, 0 insertions, 0 deletions