Re: Parallel worker hangs while handling errors.
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: vignesh C <vignesh21@gmail.com>
Cc: Robert Haas <robertmhaas@gmail.com>,
Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>,
Alvaro Herrera <alvherre@2ndquadrant.com>,
PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2020-09-03T21:01:43Z
Lists: pgsql-hackers
vignesh C <vignesh21@gmail.com> writes: > The Solution Robert & Tom are suggesting by Calling > BackgroundWorkerUnblockSignals fixes the actual problem. I've gone ahead and pushed the bgworker fix, since everyone seems to agree that that's okay, and it is provably fixing a problem. As for the question of SIGQUIT handling, I see that postgres.c does "PG_SETMASK(&BlockSig)" immediately after applying the sigdelset change, so there probably isn't any harm in having the background processes do likewise. I wonder though why bgworkers are not applying the same policy. (I remain of the opinion that any changes in this area should not be back-patched without evidence of a concrete problem; it's at least as likely that we'll introduce a problem as fix one.) 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