diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c index db61569..fdaa0bc 100644 --- a/src/backend/postmaster/postmaster.c +++ b/src/backend/postmaster/postmaster.c @@ -4970,6 +4970,18 @@ pgwin32_deadchild_callback(PVOID lpParameter, BOOLEAN TimerOrWaitFired) exitcode = 255; } + /* + * Expect error code 128 can only occur if the process failed to + * start up, and we know this is safe from shared memory corruption, + * so log it and set it back to zero. + */ + if (exitcode == ERROR_WAIT_NO_CHILDREN) + { + write_stderr("process %lu died with exit code 128, ignoring", + childinfo->procId); + exitcode = 0; + } + if (!PostQueuedCompletionStatus(win32ChildQueue, childinfo->procId, (ULONG_PTR) exitcode, NULL)) write_stderr("could not post child completion status\n");