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 1lXVP7-0001Kt-Qq for pgsql-committers@arkaria.postgresql.org; Fri, 16 Apr 2021 20:49:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lXVP6-0002YR-OU for pgsql-committers@arkaria.postgresql.org; Fri, 16 Apr 2021 20:49:28 +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 1lXVP6-0002YK-JU for pgsql-committers@lists.postgresql.org; Fri, 16 Apr 2021 20:49:28 +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 1lXVP1-00044B-LP for pgsql-committers@lists.postgresql.org; Fri, 16 Apr 2021 20:49:28 +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 13GKnL9O040655; Fri, 16 Apr 2021 16:49:21 -0400 From: Tom Lane To: Thomas Munro cc: pgsql-committers Subject: Re: pgsql: Use SIGURG rather than SIGUSR1 for latches. In-reply-to: References: <3739816.1618453573@sss.pgh.pa.us> <4006115.1618577212@sss.pgh.pa.us> Comments: In-reply-to Thomas Munro message dated "Sat, 17 Apr 2021 08:38:35 +1200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <40653.1618606161.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Fri, 16 Apr 2021 16:49:21 -0400 Message-ID: <40654.1618606161@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Thomas Munro writes: > On Sat, Apr 17, 2021 at 12:46 AM Tom Lane wrote: >> Is it really necessary to mess with UnBlockSig? > It's necessary to keep it blocked, because, to quote signalfd(2): > Normally, the set of signals to be received via the file desc= riptor > should be blocked using sigprocmask(2), to prevent the signals = being > handled according to their default dispositions. Meh. OK. (I would've thought that a SIG_IGN'd signal would be dropped immediately even if blocked; that's the behavior that dummy_handler is designed to prevent, and I'm pretty sure that that code is there because we saw it actually behaving that way on some platforms. But apparently not on Linux?) > ... All the calls to set the > disposition to SIG_IGN explicitly are probably unnecessary since > that's the default disposition, but I figured that was somehow useful > as documentation, and a place to hang a comment. Agreed, I would not suggest removing those. regards, tom lane