Re: pgsql: Use SIGURG rather than SIGUSR1 for latches.

From: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-committers <pgsql-committers(at)lists(dot)postgresql(dot)org>
Subject: Re: pgsql: Use SIGURG rather than SIGUSR1 for latches.
Date: 2021-04-17 13:28:34
Message-ID: CA+hUKGJpxMvQgDPBvqafh0JkEfHNqxCz0BHrF-5X1uo-95fm6Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

On Sat, Apr 17, 2021 at 8:49 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> (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?)

Yeah, it's a point of variation between platforms.

POSIX: "If the action associated with a blocked signal is to ignore
the signal and if that signal is generated for the process, it is
unspecified whether the signal is discarded immediately upon
generation or remains pending."
Linux: "Blocked signals are never ignored, since the signal handler
may change by the time it is unblocked."
BSDs, Darwin: "If the signal is being ignored, then we forget about it
immediately."

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2021-04-18 14:12:54 pgsql: Add missing source files to nls.mk
Previous Message Peter Eisentraut 2021-04-17 12:16:44 pgsql: doc: Fix up spacing around verbatim DocBook elements