diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2020-09-11 16:01:28 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2020-09-11 16:01:36 -0400 |
commit | 7634bd4f6d38bdef1fe442df5c2e0da73f1f90f4 (patch) | |
tree | 474ffdcd4bd467b31cbf930a4d92d174985b715d /src/backend/utils/adt/jsonpath_exec.c | |
parent | 3c99230b4f0d10c9eac5f4efdd2394eccb2af3a0 (diff) | |
download | postgresql-7634bd4f6d38bdef1fe442df5c2e0da73f1f90f4.tar.gz postgresql-7634bd4f6d38bdef1fe442df5c2e0da73f1f90f4.zip |
Accept SIGQUIT during error recovery in auxiliary processes.
The bgwriter, checkpointer, walwriter, and walreceiver processes
claimed to allow SIGQUIT "at all times". In reality SIGQUIT
would get re-blocked during error recovery, because we didn't
update the actual signal mask immediately, so sigsetjmp() would
save and reinstate a mask that includes SIGQUIT.
This appears to be simply a coding oversight. There's never a
good reason to hold off SIGQUIT in these processes, because it's
going to just call _exit(2) which should be safe enough, especially
since the postmaster is going to tear down shared memory afterwards.
Hence, stick in PG_SETMASK() calls to install the modified BlockSig
mask immediately.
Also try to improve the comments around sigsetjmp blocks. Most of
them were just referencing postgres.c, which is misleading because
actually postgres.c manages the signals differently.
No back-patch, since there's no evidence that this is causing any
problems in the field.
Discussion: https://postgr.es/m/CALDaNm1d1hHPZUg3xU4XjtWBOLCrA+-2cJcLpw-cePZ=GgDVfA@mail.gmail.com
Diffstat (limited to 'src/backend/utils/adt/jsonpath_exec.c')
0 files changed, 0 insertions, 0 deletions