Re: Parallel worker hangs while handling errors.
Robert Haas <robertmhaas@gmail.com>
From: Robert Haas <robertmhaas@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
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-11T20:23:21Z
Lists: pgsql-hackers
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. The relevant processes are pgarch.c, startup.c, bgworker.c, > autovacuum.c (launcher and workers both), and walsender.c. In the first > two of these I doubt it matters, because I don't think they'll ever block > signals again anyway -- they certainly don't have outer sigsetjmp blocks. > And I'm a bit hesitant to mess with bgworker given that we seem to expect > that to be heavily used by extension code, and we're exposing code to > allow extensions to mess with the signal blocking state. On the other > hand, as long as SIGQUIT is pointing at SignalHandlerForCrashExit, it's > hard to see a reason why holding it off could be necessary. So maybe > having a uniform rule would be good. > > Any thoughts about that? 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. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company
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