From: MasaoFujii Date: Thu, 7 Oct 2010 11:06:34 +0000 (+0900) Subject: Make the startup process respond to SIGTERM and SIGHUP immediately. X-Git-Tag: pgrex902-1.0~44 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=c310e2aaaf090996855ab5eeeec39e21a08fc122;p=pg-rex%2Fsyncrep.git Make the startup process respond to SIGTERM and SIGHUP immediately. To do that we make the signal handlers for those signals wake the startup process up. --- diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index 7fb0bdaee7..60c553fd4f 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -9174,6 +9174,7 @@ static void StartupProcSigHupHandler(SIGNAL_ARGS) { got_SIGHUP = true; + WakeupRecovery(); } /* SIGTERM: set flag to abort redo and exit */ @@ -9184,6 +9185,7 @@ StartupProcShutdownHandler(SIGNAL_ARGS) proc_exit(1); else shutdown_requested = true; + WakeupRecovery(); } /* Handle SIGHUP and SIGTERM signals of startup process */