aboutsummaryrefslogtreecommitdiff
path: root/src/backend/postmaster/postmaster.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/postmaster/postmaster.c')
-rw-r--r--src/backend/postmaster/postmaster.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c
index 367aa0ca506..067edcfe290 100644
--- a/src/backend/postmaster/postmaster.c
+++ b/src/backend/postmaster/postmaster.c
@@ -2391,13 +2391,18 @@ reaper(SIGNAL_ARGS)
}
/*
- * Any unexpected exit (including FATAL exit) of the startup
- * process is treated as a crash, except that we don't want to
- * reinitialize.
+ * After PM_STARTUP, any unexpected exit (including FATAL exit) of
+ * the startup process is catastrophic, so kill other children,
+ * and set RecoveryError so we don't try to reinitialize after
+ * they're gone. Exception: if FatalError is already set, that
+ * implies 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.
*/
if (!EXIT_STATUS_0(exitstatus))
{
- RecoveryError = true;
+ if (!FatalError)
+ RecoveryError = true;
HandleChildCrash(pid, exitstatus,
_("startup process"));
continue;