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_khu...@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 via email to