mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-01-24 18:55:04 +08:00
Treat exit code 128 (ERROR_WAIT_NO_CHILDREN) as non-fatal on Win32,
since it can happen when a process fails to start when the system is under high load. Per several bug reports and many peoples investigation. Back-patch to 8.4, which is as far back as the "deadman-switch" for shared memory access exists.
This commit is contained in:
parent
765b69ddb1
commit
ec6fca101e
@ -37,7 +37,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.614 2010/07/06 19:18:57 momjian Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.614.2.1 2010/09/16 20:37:18 mha Exp $
|
||||
*
|
||||
* NOTES
|
||||
*
|
||||
@ -2587,6 +2587,19 @@ CleanupBackend(int pid,
|
||||
* assume everything is all right and proceed to remove the backend from
|
||||
* the active backend list.
|
||||
*/
|
||||
#ifdef WIN32
|
||||
/*
|
||||
* On win32, also treat ERROR_WAIT_NO_CHILDREN (128) as nonfatal
|
||||
* case, since that sometimes happens under load when the process fails
|
||||
* to start properly (long before it starts using shared memory).
|
||||
*/
|
||||
if (exitstatus == ERROR_WAIT_NO_CHILDREN)
|
||||
{
|
||||
LogChildExit(LOG, _("server process"), pid, exitstatus);
|
||||
exitstatus = 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!EXIT_STATUS_0(exitstatus) && !EXIT_STATUS_1(exitstatus))
|
||||
{
|
||||
HandleChildCrash(pid, exitstatus, _("server process"));
|
||||
|
Loading…
Reference in New Issue
Block a user