diff -rpcd a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c *** a/src/backend/postmaster/postmaster.c 2013-10-04 13:17:03.000000000 +0900 --- b/src/backend/postmaster/postmaster.c 2013-10-04 23:21:39.541000000 +0900 *************** DetermineSleepTime(struct timeval * time *** 1423,1429 **** if (AbortStartTime > 0) { /* remaining time, but at least 1 second */ ! timeout->tv_sec = Min(SIGKILL_CHILDREN_AFTER_SECS - (time(NULL) - AbortStartTime), 1); timeout->tv_usec = 0; } --- 1423,1429 ---- if (AbortStartTime > 0) { /* remaining time, but at least 1 second */ ! timeout->tv_sec = Max(SIGKILL_CHILDREN_AFTER_SECS - (time(NULL) - AbortStartTime), 1); timeout->tv_usec = 0; } *************** ServerLoop(void) *** 1676,1685 **** --- 1676,1687 ---- * Note we also do this during recovery from a process crash. */ if ((Shutdown >= ImmediateShutdown || (FatalError && !SendStop)) && + AbortStartTime > 0 && /* SIGKILL only once */ now - AbortStartTime >= SIGKILL_CHILDREN_AFTER_SECS) { /* We were gentle with them before. Not anymore */ TerminateChildren(SIGKILL); + AbortStartTime = 0; /* * Additionally, unless we're recovering from a process crash, it's *************** reaper(SIGNAL_ARGS) *** 2584,2590 **** * Startup succeeded, commence normal operations */ FatalError = false; - AbortStartTime = 0; ReachedNormalRunning = true; pmState = PM_RUN; --- 2586,2591 ---- *************** PostmasterStateMachine(void) *** 3544,3549 **** --- 3545,3551 ---- StartupPID = StartupDataBase(); Assert(StartupPID != 0); pmState = PM_STARTUP; + AbortStartTime = 0; } } *************** sigusr1_handler(SIGNAL_ARGS) *** 4737,4743 **** { /* WAL redo has started. We're out of reinitialization. */ FatalError = false; - AbortStartTime = 0; /* * Crank up the background tasks. It doesn't matter if this fails, --- 4739,4744 ----