Re: Simplify newNode()

Thomas Munro <thomas.munro@gmail.com>

From: Thomas Munro <thomas.munro@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Heikki Linnakangas <hlinnaka@iki.fi>, Peter Eisentraut <peter@eisentraut.org>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2023-12-14T22:56:25Z
Lists: pgsql-hackers
On Fri, Dec 15, 2023 at 11:44 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Heikki Linnakangas <hlinnaka@iki.fi> writes:
> > Yeah, +1 on removing all that, including MemoryContextAllocZeroAligned.
> > It's not doing any good as it is, as it gets compiled to be identical to
> > MemoryContextAllocZero.
>
> Also not so here.  Admittedly, my results don't make much of a case
> for keeping the two code paths, even on compilers where it matters.

FWIW here is what I figured out once about why it gets compiled the
same these days:

https://www.postgresql.org/message-id/CA+hUKGLfa6ANa0vs7Lf0op0XBH05HE8SyX8NFhDyT7k2CHYLXw@mail.gmail.com



Commits

  1. Simplify newNode() by removing special cases