diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2009-07-31 20:26:23 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2009-07-31 20:26:23 +0000 |
commit | 2487d872e025312e7c16f0dd772190c6787efeea (patch) | |
tree | 32a3788fd497c755d9d8683c1ea5fa9f354f73f1 /src/backend/tcop/postgres.c | |
parent | a23c6415787bd1aa8f1c44446d689a874a78afea (diff) | |
download | postgresql-2487d872e025312e7c16f0dd772190c6787efeea.tar.gz postgresql-2487d872e025312e7c16f0dd772190c6787efeea.zip |
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
Diffstat (limited to 'src/backend/tcop/postgres.c')
-rw-r--r-- | src/backend/tcop/postgres.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c index 43e912f5cff..42e7f79f70f 100644 --- a/src/backend/tcop/postgres.c +++ b/src/backend/tcop/postgres.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/tcop/postgres.c,v 1.568 2009/06/18 10:08:08 heikki Exp $ + * $PostgreSQL: pgsql/src/backend/tcop/postgres.c,v 1.569 2009/07/31 20:26:23 tgl Exp $ * * NOTES * this is the "main" module of the postgres backend and @@ -59,6 +59,7 @@ #include "storage/bufmgr.h" #include "storage/ipc.h" #include "storage/proc.h" +#include "storage/procsignal.h" #include "storage/sinval.h" #include "tcop/fastpath.h" #include "tcop/pquery.h" @@ -3221,8 +3222,8 @@ PostgresMain(int argc, char *argv[], const char *username) * of output during who-knows-what operation... */ pqsignal(SIGPIPE, SIG_IGN); - pqsignal(SIGUSR1, CatchupInterruptHandler); - pqsignal(SIGUSR2, NotifyInterruptHandler); + pqsignal(SIGUSR1, procsignal_sigusr1_handler); + pqsignal(SIGUSR2, SIG_IGN); pqsignal(SIGFPE, FloatExceptionHandler); /* |