From: Tom Lane <tgl@sss.pgh.pa.us>
To: Thomas Munro <thomas.munro@gmail.com>
Cc: pgsql-committers <pgsql-committers@lists.postgresql.org>
Subject: Re: pgsql: Use SIGURG rather than SIGUSR1 for latches.
Date: Fri, 16 Apr 2021 16:49:21 -0400
Message-ID: <40654.1618606161@sss.pgh.pa.us> (raw)
In-Reply-To: <CA+hUKGLNNaYQbXBe+=sjn36qpie+wv4y1khW9GeOGc-EVEVrLA@mail.gmail.com>
References: <E1lGXKf-0007dm-Ix@gemulon.postgresql.org>
<3739816.1618453573@sss.pgh.pa.us>
<CA+hUKG++4qXP3oWfN5MT58TD-NMJuzmseRFE-yPc_CeJiJMVyg@mail.gmail.com>
<CA+hUKGKNgaQuOg1OaeYDBVEQ-1myNcdhA5TFaMCSXXHrwT-JkA@mail.gmail.com>
<4006115.1618577212@sss.pgh.pa.us>
<CA+hUKGLNNaYQbXBe+=sjn36qpie+wv4y1khW9GeOGc-EVEVrLA@mail.gmail.com>
Thomas Munro <thomas.munro@gmail.com> writes:
> On Sat, Apr 17, 2021 at 12:46 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Is it really necessary to mess with UnBlockSig?
> It's necessary to keep it blocked, because, to quote signalfd(2):
> Normally, the set of signals to be received via the file descriptor
> should be blocked using sigprocmask(2), to prevent the signals being
> handled according to their default dispositions.
Meh. OK.
(I would've thought that a SIG_IGN'd signal would be dropped
immediately even if blocked; that's the behavior that dummy_handler
is designed to prevent, and I'm pretty sure that that code is there
because we saw it actually behaving that way on some platforms.
But apparently not on Linux?)
> ... All the calls to set the
> disposition to SIG_IGN explicitly are probably unnecessary since
> that's the default disposition, but I figured that was somehow useful
> as documentation, and a place to hang a comment.
Agreed, I would not suggest removing those.
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-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us, thomas.munro@gmail.com
Subject: Re: pgsql: Use SIGURG rather than SIGUSR1 for latches.
In-Reply-To: <40654.1618606161@sss.pgh.pa.us>
References: <E1lGXKf-0007dm-Ix@gemulon.postgresql.org> <3739816.1618453573@sss.pgh.pa.us> <CA+hUKG++4qXP3oWfN5MT58TD-NMJuzmseRFE-yPc_CeJiJMVyg@mail.gmail.com> <CA+hUKGKNgaQuOg1OaeYDBVEQ-1myNcdhA5TFaMCSXXHrwT-JkA@mail.gmail.com> <4006115.1618577212@sss.pgh.pa.us> <CA+hUKGLNNaYQbXBe+=sjn36qpie+wv4y1khW9GeOGc-EVEVrLA@mail.gmail.com> <40654.1618606161@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