*** pgsql/src/backend/access/transam/xlog.c 2009/02/23 09:28:49 1.332 --- pgsql/src/backend/access/transam/xlog.c 2009/03/04 13:56:40 1.333 *************** *** 7,13 **** * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * ! * $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.331 2009/02/18 15:58:40 heikki Exp $ * *------------------------------------------------------------------------- */ --- 7,13 ---- * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * ! * $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.332 2009/02/23 09:28:49 heikki Exp $ * *------------------------------------------------------------------------- */ *************** static bool InRedo = false; *** 429,434 **** --- 429,435 ---- /* * Flag set by interrupt handlers for later service in the redo loop. */ + static volatile sig_atomic_t got_SIGHUP = false; static volatile sig_atomic_t shutdown_requested = false; /* * Flag set when executing a restore command, to tell SIGTERM signal handler *************** StartupXLOG(void) *** 5363,5368 **** --- 5364,5378 ---- #endif /* + * Check if we were requested to re-read config file. + */ + if (got_SIGHUP) + { + got_SIGHUP = false; + ProcessConfigFile(PGC_SIGHUP); + } + + /* * Check if we were requested to exit without finishing * recovery. */ *************** startupproc_quickdie(SIGNAL_ARGS) *** 7641,7646 **** --- 7651,7663 ---- } + /* SIGHUP: set flag to re-read config file at next convenient time */ + static void + StartupProcSigHupHandler(SIGNAL_ARGS) + { + got_SIGHUP = true; + } + /* SIGTERM: set flag to abort redo and exit */ static void StartupProcShutdownHandler(SIGNAL_ARGS) *************** StartupProcessMain(void) *** 7667,7674 **** /* * Properly accept or ignore signals the postmaster might send us */ ! pqsignal(SIGHUP, SIG_IGN); /* ignore config file updates */ ! pqsignal(SIGINT, SIG_IGN); /* ignore query cancel */ pqsignal(SIGTERM, StartupProcShutdownHandler); /* request shutdown */ pqsignal(SIGQUIT, startupproc_quickdie); /* hard crash time */ pqsignal(SIGALRM, SIG_IGN); --- 7684,7691 ---- /* * Properly accept or ignore signals the postmaster might send us */ ! pqsignal(SIGHUP, StartupProcSigHupHandler); /* reload config file */ ! pqsignal(SIGINT, SIG_IGN); /* ignore query cancel */ pqsignal(SIGTERM, StartupProcShutdownHandler); /* request shutdown */ pqsignal(SIGQUIT, startupproc_quickdie); /* hard crash time */ pqsignal(SIGALRM, SIG_IGN);