Re: Parallel worker hangs while handling errors.
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: vignesh C <vignesh21@gmail.com>,
Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>,
Alvaro Herrera <alvherre@2ndquadrant.com>,
PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2020-09-12T17:57:21Z
Lists: pgsql-hackers
Attachments
- centralize-sigquit-setup.patch (text/x-diff) patch
Robert Haas <robertmhaas@gmail.com> writes: > On Fri, Sep 11, 2020 at 4:20 PM Tom Lane <tgl@sss.pgh.pa.us> wrote: >> It's not clear to me whether we want to institute the "accepting SIGQUIT >> is always okay" rule in processes that didn't already have code to change >> BlockSig. > I think a backend process that isn't timely handling SIGQUIT is by > that very fact buggy. "pg_ctl stop -mi" isn't a friendly suggestion. > So I favor trying to make it uniform. Well, if we want to take a hard line about that, we should centralize the setup of SIGQUIT. The attached makes InitPostmasterChild do it, and removes the duplicative code from elsewhere. I also flipped autovacuum and walsender from using quickdie to using SignalHandlerForCrashExit. Whatever you think about the safety or unsafety of quickdie, there seems no reason for autovacuum to be trying to tell its nonexistent client about a shutdown. I don't think it's terribly useful for a walsender either, though maybe somebody has a different opinion about that? regards, tom lane
Commits
-
Centralize setup of SIGQUIT handling for postmaster child processes.
- 44fc6e259b79 14.0 landed
-
Accept SIGQUIT during error recovery in auxiliary processes.
- 7634bd4f6d38 14.0 landed
-
Avoid lockup of a parallel worker when reporting a long error message.
- be4b0c0077e6 14.0 landed
- 82dd373f2c56 12.5 landed
- 526df0a236df 11.10 landed
- 3738651f5b82 9.5.24 landed
- 2a938c7935cf 10.15 landed
- 2500e51e7bdc 9.6.20 landed
- 17424e79d979 13.0 landed