Re: SIGQUIT handling, redux
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: pgsql-hackers@lists.postgresql.org
Date: 2020-09-09T23:24:55Z
Lists: pgsql-hackers
Attachments
- safer-startup-packet-signals-1.patch (text/x-diff) patch
Here's a draft patch that I think would be reasonable to back-patch. (Before v13, we'd need a bespoke SIGQUIT handler to substitute for SignalHandlerForCrashExit, but that's easy enough.) Aside from comment updates, this * uses SignalHandlerForCrashExit for SIGQUIT * renames startup_die per your request * moves BackendInitialize's interrupt-re-disabling code up a bit to reduce the scope where these interrupts are active. This doesn't make things a whole lot safer, but it can't hurt. I'll take a closer look at the idea of using _exit(1) tomorrow, but I'd be pretty hesitant to back-patch that. regards, tom lane
Commits
-
Log a message when resorting to SIGKILL during shutdown/crash recovery.
- 10095ca634fb 14.0 landed
-
Don't run atexit callbacks during signal exits from ProcessStartupPacket.
- 6693a96b329e 14.0 landed
-
Use _exit(2) for SIGQUIT during ProcessStartupPacket, too.
- 58c6feccfae1 14.0 landed
- e2c9bedc9660 9.5.24 landed
- dc71c640985f 9.6.20 landed
- ac695b8f2d11 10.15 landed
- 93871b693c3e 11.10 landed
- 4e10c0c8a669 12.5 landed
- 3f29aa48b6df 13.0 landed
-
Make archiver's SIGQUIT handler exit via _exit().
- bedadc73220f 14.0 landed
- d038c6c6318b 12.5 landed
- b2eaddd9b00a 9.6.20 landed
- 95cd8902e62d 10.15 landed
- 67dde49a3ddb 11.10 landed
- 581855b6ae23 9.5.24 landed
- 35e59398abbb 13.0 landed