From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: Thomas Munro <thomas.munro@gmail.com>
Cc: Heikki Linnakangas <hlinnaka@iki.fi>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: kevent latch paths don't handle postmaster death well
Date: Wed, 14 Oct 2020 19:14:35 -0400
Message-ID: <3638494.1602717275@sss.pgh.pa.us> (raw)
In-Reply-To: <20201014225942.oya7ncon63ltwrnq@alap3.anarazel.de>
References: <3624029.1602701929@sss.pgh.pa.us>
<CA+hUKGKvy_o=gXkbDEnpmJL-PcihAv272v-R+tpX3SdA+NdGVg@mail.gmail.com>
<3625898.1602704431@sss.pgh.pa.us>
<CA+hUKGJ8aHjyxccsn3z4NOpnWBdfUSmzVPm6uc_B63ODnQvvPA@mail.gmail.com>
<20201014225942.oya7ncon63ltwrnq@alap3.anarazel.de>
Andres Freund <andres@anarazel.de> writes:
> On 2020-10-15 11:10:28 +1300, Thomas Munro wrote:
>> 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.
> Will it do so even if the kqueue is created after postmaster death?
I did not try to test it, but there's code that purports to handle that
in latch.c, ~ line 1150, and the behavior it's expecting mostly agrees
with what I read in the macOS kevent man page. One thing I'd suggest
is that EACCES probably needs to be treated as "postmaster already dead",
too, in case the PID is now owned by another user ID.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, andres@anarazel.de, thomas.munro@gmail.com, hlinnaka@iki.fi
Subject: Re: kevent latch paths don't handle postmaster death well
In-Reply-To: <3638494.1602717275@sss.pgh.pa.us>
References: <3624029.1602701929@sss.pgh.pa.us> <CA+hUKGKvy_o=gXkbDEnpmJL-PcihAv272v-R+tpX3SdA+NdGVg@mail.gmail.com> <3625898.1602704431@sss.pgh.pa.us> <CA+hUKGJ8aHjyxccsn3z4NOpnWBdfUSmzVPm6uc_B63ODnQvvPA@mail.gmail.com> <20201014225942.oya7ncon63ltwrnq@alap3.anarazel.de> <3638494.1602717275@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox