Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kDwMl-00024E-PC for pgsql-hackers@arkaria.postgresql.org; Thu, 03 Sep 2020 21:01:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kDwMk-00085S-Hs for pgsql-hackers@arkaria.postgresql.org; Thu, 03 Sep 2020 21:01:54 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kDwMk-00085L-AR for pgsql-hackers@lists.postgresql.org; Thu, 03 Sep 2020 21:01:54 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kDwMe-0002lB-3N for pgsql-hackers@lists.postgresql.org; Thu, 03 Sep 2020 21:01:53 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 083L1h3H770280; Thu, 3 Sep 2020 17:01:43 -0400 From: Tom Lane To: vignesh C cc: Robert Haas , Bharath Rupireddy , Alvaro Herrera , PostgreSQL Hackers Subject: Re: Parallel worker hangs while handling errors. In-reply-to: References: Comments: In-reply-to vignesh C message dated "Tue, 11 Aug 2020 20:08:11 +0530" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <770278.1599166903.1@sss.pgh.pa.us> Date: Thu, 03 Sep 2020 17:01:43 -0400 Message-ID: <770279.1599166903@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk vignesh C 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