Re: pgsql: Small tidyup for commit d41a178b. - Mailing list pgsql-committers

From Thomas Munro
Subject Re: pgsql: Small tidyup for commit d41a178b.
Date
Msg-id CA+hUKG+cQxEjAO3ON1W_s4-P9JwH=oLFmwp05g2sKUrk=trBTA@mail.gmail.com
Whole thread Raw
In response to Re: pgsql: Small tidyup for commit d41a178b.  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-committers
On Fri, Mar 17, 2023 at 1:36 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Thomas Munro <tmunro@postgresql.org> writes:
> > Small tidyup for commit d41a178b.
> > A comment was left behind claiming that we needed to use malloc() rather
> > than palloc() because the corresponding free would run in another
> > thread, but that's not true anymore.  Remove that comment.  And, with
> > the reason being gone, we might as well actually use palloc().
>
> Hm, doesn't the change to palloc make the following error check redundant?
>
>         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;

True.  Will fix.



pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: Re: pgsql: Small tidyup for commit d41a178b.
Next
From: Thomas Munro
Date:
Subject: pgsql: Small tidyup for commit d41a178b, part II.