diff options
author | Magnus Hagander <magnus@hagander.net> | 2010-09-16 20:37:18 +0000 |
---|---|---|
committer | Magnus Hagander <magnus@hagander.net> | 2010-09-29 16:18:41 +0200 |
commit | 9c2ba6ad09aba37409c7535910e79425773fe568 (patch) | |
tree | fc86184732a06f0eb96cb64a669b59502fbdc94f | |
parent | 2c875a1deaba78d04e749397b630073d7723c476 (diff) | |
download | postgresql-9c2ba6ad09aba37409c7535910e79425773fe568.tar.gz postgresql-9c2ba6ad09aba37409c7535910e79425773fe568.zip |
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.2, since testing shows no issues even though the
"deadman-switch" does not exist in this version.
-rw-r--r-- | src/backend/postmaster/postmaster.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c index 583604fcdf2..21ed2eaf669 100644 --- a/src/backend/postmaster/postmaster.c +++ b/src/backend/postmaster/postmaster.c @@ -2273,6 +2273,19 @@ CleanupBackend(int pid, * assume everything is all right and simply 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")); |