Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nJmwR-0000Jp-JB for pgsql-hackers@arkaria.postgresql.org; Tue, 15 Feb 2022 01:47:43 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nJmwQ-0007gf-5X for pgsql-hackers@arkaria.postgresql.org; Tue, 15 Feb 2022 01:47:42 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nJmwP-0007gW-SW for pgsql-hackers@lists.postgresql.org; Tue, 15 Feb 2022 01:47:41 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nJmwN-0007vL-Kf for pgsql-hackers@postgresql.org; Tue, 15 Feb 2022 01:47:41 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 21F1lXeU2972051; Mon, 14 Feb 2022 20:47:34 -0500 From: Tom Lane To: Andres Freund cc: Peter Eisentraut , pgsql-hackers Subject: Re: automatically generating node support functions In-reply-to: <20220215013246.ya3cb6stf4taqxjt@alap3.anarazel.de> References: <50fedc80-4104-bdc8-d777-04f030fc550f@dunslane.net> <7848b872-7a10-67b2-b55f-7c9c475ae863@enterprisedb.com> <40a2e977-98ba-0c01-af6c-9dfb39e864ba@enterprisedb.com> <812ea8eb-6827-ba32-6ec0-6714f7ffa5dd@enterprisedb.com> <2905876.1644858587@sss.pgh.pa.us> <20220214232348.dt3uxaoq3rdka2aj@alap3.anarazel.de> <2960078.1644881541@sss.pgh.pa.us> <20220215013246.ya3cb6stf4taqxjt@alap3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Mon, 14 Feb 2022 17:32:46 -0800" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2972049.1644889653.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Mon, 14 Feb 2022 20:47:33 -0500 Message-ID: <2972050.1644889653@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Andres Freund writes: > On 2022-02-14 18:32:21 -0500, Tom Lane wrote: >> I think that finishing out and committing this patch is a fine step >> on the way to that. > I think most of gen_node_support.pl would change - a lot of that is gene= rating > the node functions, which would not be needed anymore. And most of the > remainder would change as well. Well, yeah, we'd be throwing away some of that Perl code. So what? 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. 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. 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. regards, tom lane