]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Use SIGURG rather than SIGUSR1 for latches.
authorThomas Munro <tmunro@postgresql.org>
Sun, 28 Feb 2021 22:58:10 +0000 (11:58 +1300)
committerThomas Munro <tmunro@postgresql.org>
Sun, 28 Feb 2021 23:44:12 +0000 (12:44 +1300)
commit83709a0d5a46559db016c50ded1a95fd3b0d3be6
tree230ce1ed5759345832f9ec5fb47d97e38e0ec025
parentc8f3bc2401e7df7b79bae39dd3511c91f825b6a4
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
src/backend/postmaster/bgworker.c
src/backend/postmaster/postmaster.c
src/backend/storage/ipc/latch.c
src/backend/storage/ipc/procsignal.c
src/include/storage/latch.h