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 1kG6jt-0007H6-D9 for pgsql-hackers@arkaria.postgresql.org; Wed, 09 Sep 2020 20:30:45 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kG6jr-0004z1-0o for pgsql-hackers@arkaria.postgresql.org; Wed, 09 Sep 2020 20:30:43 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kG6jq-0004yj-QM for pgsql-hackers@lists.postgresql.org; Wed, 09 Sep 2020 20:30:42 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kG6jo-0007KH-Jk for pgsql-hackers@lists.postgresql.org; Wed, 09 Sep 2020 20:30:41 +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 089KUbLs112674; Wed, 9 Sep 2020 16:30:37 -0400 From: Tom Lane To: Andres Freund cc: pgsql-hackers@lists.postgresql.org Subject: Re: SIGQUIT handling, redux In-reply-to: <20200909202201.unpjmshshu7sge6i@alap3.anarazel.de> References: <1850884.1599601164@sss.pgh.pa.us> <20200909192620.dylomoxknmt6rdb3@alap3.anarazel.de> <110116.1599682140@sss.pgh.pa.us> <20200909202201.unpjmshshu7sge6i@alap3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Wed, 09 Sep 2020 13:22:01 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <112672.1599683437.1@sss.pgh.pa.us> Date: Wed, 09 Sep 2020 16:30:37 -0400 Message-ID: <112673.1599683437@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Andres Freund writes: > On 2020-09-09 16:09:00 -0400, Tom Lane wrote: >> We could call it startup_packet_die or something? > Yea, I think that'd be good. I'll make it so. >> We see backends going through this code on a very regular basis in the >> buildfarm, but complete hangs are rare as can be. I think you >> overestimate the severity of the problem. > I don't think the BF exercises the problmetic paths to a significant > degree. It's mostly local socket connections, and where not it's > localhost. There's no slow DNS, no more complicated authentication > methods, no packet loss. How often do we ever actually end up even > getting close to any of the paths but immediate shutdowns? Since we're talking about quickdie(), immediate shutdown/crash restart is exactly the case of concern, and the buildfarm exercises it all the time. > And in the > SIGQUIT path, how often do we end up in the SIGKILL path, masking > potential deadlocks? True, we can't really tell that. I wonder if we should make the postmaster emit a log message when it times out and goes to SIGKILL. After a few months we could scrape the buildfarm logs and get a pretty good handle on it. regards, tom lane