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 1kTAzs-0001qG-Ka for pgsql-hackers@arkaria.postgresql.org; Thu, 15 Oct 2020 21:41:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kTAzr-0003tR-8r for pgsql-hackers@arkaria.postgresql.org; Thu, 15 Oct 2020 21:41:15 +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 1kTAzr-0003tJ-2F for pgsql-hackers@lists.postgresql.org; Thu, 15 Oct 2020 21:41:15 +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 1kTAzk-0007vJ-8o for pgsql-hackers@lists.postgresql.org; Thu, 15 Oct 2020 21:41:14 +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 09FLepWC3896449; Thu, 15 Oct 2020 17:40:51 -0400 From: Tom Lane To: Thomas Munro cc: Andres Freund , Heikki Linnakangas , PostgreSQL Hackers Subject: Re: kevent latch paths don't handle postmaster death well In-reply-to: References: <3624029.1602701929@sss.pgh.pa.us> <3625898.1602704431@sss.pgh.pa.us> <20201014225942.oya7ncon63ltwrnq@alap3.anarazel.de> <3638494.1602717275@sss.pgh.pa.us> Comments: In-reply-to Thomas Munro message dated "Fri, 16 Oct 2020 10:32:54 +1300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3896446.1602798051.1@sss.pgh.pa.us> Date: Thu, 15 Oct 2020 17:40:51 -0400 Message-ID: <3896447.1602798051@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Thomas Munro writes: > I couldn't resist digging further into the Apple sources to figure out > what was going on there, and I realised that the code path I was > looking at can only report EACCES if you asked for NOTE_EXITSTATUS, > which appears to be an Apple extension to the original FreeBSD kqueue > system designed to let you receive the exit status of the monitored > process. That is indeed much more privileged information, and it's > only allowed for your own children. Ah. > So it's possible that commit > 70516a17 was a waste of electrons, but I don't think it can hurt; Yeah, I'm not inclined to revert it. If we did get that errno, it'd be hard to interpret it in any way that didn't involve the postmaster being gone. regards, tom lane