Re: automatically generating node support functions

From: Andres Freund <andres(at)anarazel(dot)de>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>, David Rowley <dgrowleyml(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: automatically generating node support functions
Date: 2022-07-11 18:29:15
Message-ID: 20220711182915.jd2ibajdcbncqdqd@awork3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 2022-07-11 13:57:38 -0400, Tom Lane wrote:
> More generally, I'm having second thoughts about the wisdom of
> auto-generating the NodeTag enum at all. With the current setup,
> I am absolutely petrified about the risk of silent ABI breakage
> thanks to the enum order changing. In particular, if the meson
> build fails to use the same input-file order as the makefile build,
> then we will get different enum orders from the two builds, causing
> an ABI discrepancy that nobody would notice until we had catastrophic
> extension-compatibility issues in the field.

Ugh, yes. And it already exists due to Solution.pm, although that's perhaps
less likely to be encountered "in the wild".

Additionally, I think we've had to add tags to the enum in minor releases
before and I'm afraid this now would end up looking even more awkward?

> Of course, sorting the tags by name is a simple way to fix that.
> But I'm not sure I want to buy into being forced to do it like that,
> because of the switch-density question.
>
> So at this point I'm rather attracted to the idea of reverting to
> a manually-maintained NodeTag enum.

+0.5 - there might be a better solution to this, but I'm not immediately
seeing it.

Greetings,

Andres Freund

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Daniel Gustafsson 2022-07-11 18:55:37 Re: Commitfest Update
Previous Message Bruce Momjian 2022-07-11 18:23:37 Re: First draft of the PG 15 release notes