RE: SIGQUIT handling, redux
tsunakawa.takay@fujitsu.com <tsunakawa.takay@fujitsu.com>
From: "tsunakawa.takay@fujitsu.com" <tsunakawa.takay@fujitsu.com>
To: 'Tom Lane' <tgl@sss.pgh.pa.us>
Cc: "pgsql-hackers@lists.postgresql.org" <pgsql-hackers@lists.postgresql.org>
Date: 2020-09-10T02:56:37Z
Lists: pgsql-hackers
From: Tom Lane <tgl@sss.pgh.pa.us> > This is straying a bit from the stated topic of this thread, but ... > I did some further looking around to see whether there were any > unsafe signal handlers besides SIGQUIT ones. The situation is not > too awful, but I did find several issues not already mentioned > in this thread: Wow, your eyes catch this many issues. (I was just wondering about one or two of them.) I'm not sure if this is related, but I had been wondering if the following can be what it is now. (1) When logical replication is used, pg_ctl stop with the default fast mode emits the message about termination of logical replication launcher. Although it's not FATAL or ERROR, but I was a bit startled when I saw this message for the first time. Why should this message be emitted while nothing about other postmaster children are reported? The logical rep launcher ignores SIGINT (SIG_IGN). LOG: received fast shutdown request LOG: aborting any active transactions LOG: background worker "logical replication launcher" (PID 10056) exited with exit code 1 LOG: shutting down LOG: database system is shut down (2) When the physical standby stops, a FATAL message is output. It may be annoying to the DBA that monitors messages with high severity. LOG: received fast shutdown request LOG: aborting any active transactions FATAL: terminating walreceiver process due to administrator command LOG: shutting down LOG: database system is shut down (3) When WaitLatch(EXIT_ON_POSTMASTER_DEATH) detects postmaster death, it calls proc_exit(1). Can we call _exit(1) here likewise? Regards Takayuki Tsunakawa
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