Comment enhancements
authorHeikki Linnakangas <heikki@enterprisedb.com>
Fri, 30 Jan 2009 14:43:47 +0000 (16:43 +0200)
committerHeikki Linnakangas <heikki@enterprisedb.com>
Fri, 30 Jan 2009 14:43:47 +0000 (16:43 +0200)
src/backend/postmaster/postmaster.c

index fd1d5a4431caff80852db9d4872b7049e998003e..15fc7ad3d666b16197fd5142d6aca5cb5bc0fd01 100644 (file)
@@ -2155,6 +2155,13 @@ reaper(SIGNAL_ARGS)
                {
                        StartupPID = 0;
 
+                       /*
+                        * Check if we've received a signal from the startup process
+                        * first. This can change pmState. If the startup process sends
+                        * a signal, and exits immediately after that, we might not have
+                        * processed the signal yet, and we need to know if it completed
+                        * recovery before exiting.
+                        */
                        CheckRecoverySignals();
 
                        /*
@@ -3985,6 +3992,10 @@ ExitPostmaster(int status)
        proc_exit(status);
 }
 
+/*
+ * common code used in sigusr1_handler() and reaper() to handle
+ * recovery-related signals from startup process
+ */
 static void
 CheckRecoverySignals(void)
 {