Create a multiplexing structure for signals to Postgres child processes.
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 31 Jul 2009 20:26:23 +0000 (20:26 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 31 Jul 2009 20:26:23 +0000 (20:26 +0000)
commit36e5094525a0c8f2812f8412745aa3675d000881
treed1c02ce1f4b1e833f57bb7c8113a994067f51d9b
parent907997ccfdcdd89f16f9738effa5892362fa4719
Create a multiplexing structure for signals to Postgres child processes.

This patch gets us out from under the Unix limitation of two user-defined
signal types.  We already had done something similar for signals directed to
the postmaster process; this adds multiplexing for signals directed to
backends and auxiliary processes (so long as they're connected to shared
memory).

As proof of concept, replace the former usage of SIGUSR1 and SIGUSR2
for backends with use of the multiplexing mechanism.  There are still some
hard-wired definitions of SIGUSR1 and SIGUSR2 for other process types,
but getting rid of those doesn't seem interesting at the moment.

Fujii Masao
16 files changed:
src/backend/bootstrap/bootstrap.c
src/backend/commands/async.c
src/backend/postmaster/autovacuum.c
src/backend/postmaster/bgwriter.c
src/backend/postmaster/walwriter.c
src/backend/storage/ipc/Makefile
src/backend/storage/ipc/ipci.c
src/backend/storage/ipc/procsignal.c [new file with mode: 0644]
src/backend/storage/ipc/sinval.c
src/backend/storage/ipc/sinvaladt.c
src/backend/tcop/postgres.c
src/backend/utils/init/postinit.c
src/include/bootstrap/bootstrap.h
src/include/commands/async.h
src/include/storage/procsignal.h [new file with mode: 0644]
src/include/storage/sinval.h