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>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: automatically generating node support functions
Date: 2022-02-15 02:10:25
Message-ID: 20220215021025.bubenwmfnmahkasx@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 2022-02-14 20:47:33 -0500, Tom Lane wrote:
> I think that most of the intellectual content in this patch is getting
> the data source nailed down, ie putting the annotations into the *nodes.h
> files and building the code to parse that. I don't have a problem
> with throwing away and rewriting the back-end part of the patch later.

Imo that cuts the other way - without going for a metadata based approach we
don't know if we made the annotations rich enough...

> And, TBH, I am not really convinced that a pure metadata approach is going
> to work out, or that it will have sufficient benefit over just automating
> the way we do it now. I notice that Peter's patch leaves a few
> too-much-of-a-special-case functions unconverted, which is no real
> problem for his approach; but it seems like you won't get to take such
> shortcuts in a metadata-reading implementation.

IMO my prototype of that approach pretty conclusively shows that it's feasible
and worthwhile.

> The bottom line here is that I believe that Peter's patch could get us out
> of the business of hand-maintaining the backend/nodes/*.c files in the v15
> timeframe, which would be a very nice thing. I don't see how your patch
> will be ready on anywhere near the same schedule. When it is ready, we can
> switch, but in the meantime I'd like the maintenance benefit.

I'm not going to try to prevent the patch from going in. But I don't think
it's a great idea to this without even trying to ensure the annotations are
rich enough...

Greetings,

Andres Freund

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Kyotaro Horiguchi 2022-02-15 02:22:38 Re: Make mesage at end-of-recovery less scary.
Previous Message Thomas Munro 2022-02-15 01:57:39 Re: Postgres 14.2 Windows can't rename temporary statistics file