OSDN Git Service

Make the startup process respond to SIGTERM and SIGHUP immediately.
authorMasaoFujii <masao.fujii@gmail.com>
Thu, 7 Oct 2010 11:06:34 +0000 (20:06 +0900)
committerMasaoFujii <masao.fujii@gmail.com>
Thu, 7 Oct 2010 11:10:06 +0000 (20:10 +0900)
To do that we make the signal handlers for those signals wake the
startup process up.

src/backend/access/transam/xlog.c

index 7fb0bda..60c553f 100644 (file)
@@ -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 */