Re: SIGQUIT handling, redux
Andres Freund <andres@anarazel.de>
From: Andres Freund <andres@anarazel.de>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@lists.postgresql.org
Date: 2020-09-09T21:06:54Z
Lists: pgsql-hackers
Hi, On 2020-09-09 16:30:37 -0400, Tom Lane wrote: > Andres Freund <andres@anarazel.de> writes: > > On 2020-09-09 16:09:00 -0400, Tom Lane wrote: > >> We could call it startup_packet_die or something? > > > Yea, I think that'd be good. > > I'll make it so. Thanks! > >> We see backends going through this code on a very regular basis in the > >> buildfarm, but complete hangs are rare as can be. I think you > >> overestimate the severity of the problem. > > > I don't think the BF exercises the problmetic paths to a significant > > degree. It's mostly local socket connections, and where not it's > > localhost. There's no slow DNS, no more complicated authentication > > methods, no packet loss. How often do we ever actually end up even > > getting close to any of the paths but immediate shutdowns? > > Since we're talking about quickdie(), immediate shutdown/crash restart > is exactly the case of concern, and the buildfarm exercises it all the > time. Yea, but only in simple cases. Largely no SSL / kerberos. Largely untranslated. Mostly the immediate shutdowns aren't when inside plpython or such. > > And in the > > SIGQUIT path, how often do we end up in the SIGKILL path, masking > > potential deadlocks? > > True, we can't really tell that. I wonder if we should make the > postmaster emit a log message when it times out and goes to SIGKILL. > After a few months we could scrape the buildfarm logs and get a > pretty good handle on it. I think that'd be a good idea. Greetings, Andres Freund
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