Re: pgsql: Small tidyup for commit d41a178b.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Thomas Munro <tmunro(at)postgresql(dot)org>
Cc: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: Small tidyup for commit d41a178b.
Date: 2023-03-17 00:36:28
Message-ID: 4040668.1679013388@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Thomas Munro <tmunro(at)postgresql(dot)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;

regards, tom lane

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Thomas Munro 2023-03-17 00:51:28 Re: pgsql: Small tidyup for commit d41a178b.
Previous Message Tom Lane 2023-03-16 22:13:50 pgsql: Enable use of Memoize atop an Append that came from UNION ALL.