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 1kSmdh-0005Ad-2C for pgsql-hackers@arkaria.postgresql.org; Wed, 14 Oct 2020 19:40: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 1kSmdg-00048z-0i for pgsql-hackers@arkaria.postgresql.org; Wed, 14 Oct 2020 19:40:44 +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 1kSmdf-00048s-QI for pgsql-hackers@lists.postgresql.org; Wed, 14 Oct 2020 19:40:43 +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 1kSmdd-0000fu-RR for pgsql-hackers@lists.postgresql.org; Wed, 14 Oct 2020 19:40:42 +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 09EJeV8P3625899; Wed, 14 Oct 2020 15:40:31 -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> Comments: In-reply-to Thomas Munro message dated "Thu, 15 Oct 2020 08:36:37 +1300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3625897.1602704431.1@sss.pgh.pa.us> Date: Wed, 14 Oct 2020 15:40:31 -0400 Message-ID: <3625898.1602704431@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Thomas Munro writes: > The process exit event is like an 'edge', not a 'level'... hmm. It > might be enough to set report_postmaster_not_running = true the first > time it tells us so if we try to wait again we'll treat it like a > level. I will look into it later today. 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. regards, tom lane