From: Thomas Munro <tmunro@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Use SIGURG rather than SIGUSR1 for latches.
Date: Mon, 01 Mar 2021 01:26:45 +0000
Message-ID: <E1lGXKf-0007dm-Ix@gemulon.postgresql.org> (raw)
Use SIGURG rather than SIGUSR1 for latches.
Traditionally, SIGUSR1 has been overloaded for ad-hoc signals,
procsignal.c signals and latch.c wakeups. Move that last use over to a
new dedicated signal. SIGURG is normally used to report out-of-band
socket data, but PostgreSQL doesn't use that facility.
The signal handler is now installed in all postmaster children by
InitializeLatchSupport(). Those wishing to disconnect from it should
call ShutdownLatchSupport().
Future patches will use this separation of signals to avoid the need for
a signal handler on some operating systems.
Discussion: https://postgr.es/m/CA+hUKGJjxPDpzBE0a3hyUywBvaZuC89yx3jK9RFZgfv_KHU7gg@mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/83709a0d5a46559db016c50ded1a95fd3b0d3be6
Modified Files
--------------
src/backend/postmaster/bgworker.c | 19 ++------------
src/backend/postmaster/postmaster.c | 4 +++
src/backend/storage/ipc/latch.c | 50 ++++++++++++++++++++++++------------
src/backend/storage/ipc/procsignal.c | 2 --
src/include/storage/latch.h | 11 +-------
5 files changed, 40 insertions(+), 46 deletions(-)
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: tmunro@postgresql.org
Subject: Re: pgsql: Use SIGURG rather than SIGUSR1 for latches.
In-Reply-To: <E1lGXKf-0007dm-Ix@gemulon.postgresql.org>
References: <E1lGXKf-0007dm-Ix@gemulon.postgresql.org>
* 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