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 1kSp71-0002xo-Vs for pgsql-hackers@arkaria.postgresql.org; Wed, 14 Oct 2020 22:19:11 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kSp70-0001yu-Qc for pgsql-hackers@arkaria.postgresql.org; Wed, 14 Oct 2020 22:19:10 +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 1kSp70-0001yF-Jw for pgsql-hackers@lists.postgresql.org; Wed, 14 Oct 2020 22:19:10 +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 1kSp6y-0004dp-5j for pgsql-hackers@lists.postgresql.org; Wed, 14 Oct 2020 22:19:10 +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 09EMIr3Q3636131; Wed, 14 Oct 2020 18:18:53 -0400 From: Tom Lane To: Thomas Munro cc: 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> Comments: In-reply-to Thomas Munro message dated "Thu, 15 Oct 2020 11:10:28 +1300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3636129.1602713933.1@sss.pgh.pa.us> Date: Wed, 14 Oct 2020 18:18:53 -0400 Message-ID: <3636130.1602713933@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Thomas Munro writes: > On Thu, Oct 15, 2020 at 8:40 AM Tom Lane wrote: >> Seems like having that be per-WaitEventSet state is also not a great >> idea --- if we detect PM death while waiting on one WES, and then >> wait on another one, it won't work. A plain process-wide static >> variable would be a better way I bet. > I don't think that's a problem -- the kernel will report the event to > each interested kqueue object. The attached fixes the problem for me. Oh, OK. I confirm this makes the kqueue path work like the EPOLL and POLL paths. (I can't test the WIN32 path.) regards, tom lane