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 1lXNsj-0002gV-SE for pgsql-committers@arkaria.postgresql.org; Fri, 16 Apr 2021 12:47:33 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lXNsD-0001G3-2j for pgsql-committers@arkaria.postgresql.org; Fri, 16 Apr 2021 12:47:01 +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 1lXNsC-0001Fw-Tp for pgsql-committers@lists.postgresql.org; Fri, 16 Apr 2021 12:47:00 +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 1lXNs6-0007Gg-Nm for pgsql-committers@lists.postgresql.org; Fri, 16 Apr 2021 12:47:00 +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 13GCkqs14006116; Fri, 16 Apr 2021 08:46:52 -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> Comments: In-reply-to Thomas Munro message dated "Fri, 16 Apr 2021 16:03:36 +1200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <4006114.1618577212.1@sss.pgh.pa.us> Date: Fri, 16 Apr 2021 08:46:52 -0400 Message-ID: <4006115.1618577212@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Thomas Munro writes: > Here's a patch to change that. But... on second thoughts, and after > coming up with a commit message to explain the change, I'm not 100% > convinced it's worth committing. You can't get SIGURG without > explicitly asking for it (by setting maybe_sleeping), which makes it a > bit more like SIGALRM than SIGUSR2. I don't feel very strongly about > this though. What do you think? Hmm, yeah, after looking more closely at InitializeLatchSupport I agree. There's so much platform variability in whether we use the signal handler at all that it seems best to keep it SIGIGN'd until we reach that code. It might be good to extend the comment in postmaster.c though, perhaps along the lines of "Ignore SIGURG for now. Child processes may change this (see InitializeLatchSupport), but they will not receive any such signals until they wait on a latch". Is it really necessary to mess with UnBlockSig? regards, tom lane