*
* When the startup process is ready to start archive recovery, it signals the
* postmaster, and we switch to PM_RECOVERY state. The background writer and
- * checkpointer are launched, while the startup process continues applying WAL.
- * If Hot Standby is enabled, then, after reaching a consistent point in WAL
- * redo, startup process signals us again, and we switch to PM_HOT_STANDBY
- * state and begin accepting connections to perform read-only queries. When
- * archive recovery is finished, the startup process exits with exit code 0
- * and we switch to PM_RUN state.
+ * checkpointer are already running (as these are launched during PM_STARTUP),
+ * and the startup process continues applying WAL. If Hot Standby is enabled,
+ * then, after reaching a consistent point in WAL redo, startup process
+ * signals us again, and we switch to PM_HOT_STANDBY state and begin accepting
+ * connections to perform read-only queries. When archive recovery is
+ * finished, the startup process exits with exit code 0 and we switch to
+ * PM_RUN state.
*
* Normal child backends can only be launched when we are in PM_RUN or
* PM_HOT_STANDBY state. (connsAllowed can also restrict launching.)
}
/*
- * Unexpected exit of startup process (including FATAL exit)
- * during PM_STARTUP is treated as catastrophic. There are no
- * other processes running yet, so we can just exit.
- */
- if (pmState == PM_STARTUP &&
- StartupStatus != STARTUP_SIGNALED &&
- !EXIT_STATUS_0(exitstatus))
- {
- LogChildExit(LOG, _("startup process"),
- pid, exitstatus);
- ereport(LOG,
- (errmsg("aborting startup due to startup process failure")));
- ExitPostmaster(1);
- }
-
- /*
- * After PM_STARTUP, any unexpected exit (including FATAL exit) of
- * the startup process is catastrophic, so kill other children,
- * and set StartupStatus so we don't try to reinitialize after
- * they're gone. Exception: if StartupStatus is STARTUP_SIGNALED,
- * then we previously sent the startup process a SIGQUIT; so
- * that's probably the reason it died, and we do want to try to
- * restart in that case.
+ * Any unexpected exit (including FATAL exit) of the startup
+ * process is catastrophic, so kill other children, and set
+ * StartupStatus so we don't try to reinitialize after they're
+ * gone. Exception: if StartupStatus is STARTUP_SIGNALED, then we
+ * previously sent the startup process a SIGQUIT; so that's
+ * probably the reason it died, and we do want to try to restart
+ * in that case.
*
* This stanza also handles the case where we sent a SIGQUIT
* during PM_STARTUP due to some dead-end child crashing: in that
/* shouldn't have any children */
Assert(false);
break;
- case PM_STARTUP:
- /* should have been handled in process_pm_child_exit */
- Assert(false);
- break;
/* wait for children to die */
+ case PM_STARTUP:
case PM_RECOVERY:
case PM_HOT_STANDBY:
case PM_RUN: