Small tidyup for commit d41a178b, part II.
authorThomas Munro <[email protected]>
Fri, 17 Mar 2023 01:44:12 +0000 (14:44 +1300)
committerThomas Munro <[email protected]>
Fri, 17 Mar 2023 01:47:16 +0000 (14:47 +1300)
Further to commit 6a9229da, checking for NULL is now redundant.  An "out
of memory" error would have been thrown already by palloc() and treated
as FATAL, so we can delete a few more lines.

Back-patch to all releases, like those other commits.

Reported-by: Tom Lane <[email protected]>
Discussion: https://postgr.es/m/4040668.1679013388%40sss.pgh.pa.us

src/backend/postmaster/postmaster.c

index 56f9f272cae4b408c0f6bb18c0f8d31e7fdcca35..6f51fe693501205b809dcf0cdbd2d57fc03c99a5 100644 (file)
@@ -4880,11 +4880,6 @@ retry:
     * freed by a later call to waitpid().
     */
    childinfo = palloc(sizeof(win32_deadchild_waitinfo));
-   if (!childinfo)
-       ereport(FATAL,
-               (errcode(ERRCODE_OUT_OF_MEMORY),
-                errmsg("out of memory")));
-
    childinfo->procHandle = pi.hProcess;
    childinfo->procId = pi.dwProcessId;