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 1oAzUF-0000Wc-GK for pgsql-hackers@arkaria.postgresql.org; Mon, 11 Jul 2022 19:54:31 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oAzUD-0003d9-SW for pgsql-hackers@arkaria.postgresql.org; Mon, 11 Jul 2022 19:54:29 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oAzUD-0003d0-JJ for pgsql-hackers@lists.postgresql.org; Mon, 11 Jul 2022 19:54:29 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oAzUB-0001tN-Bl for pgsql-hackers@postgresql.org; Mon, 11 Jul 2022 19:54:28 +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 26BJsMao1229447; Mon, 11 Jul 2022 15:54:22 -0400 From: Tom Lane To: Robert Haas cc: Peter Eisentraut , Andres Freund , David Rowley , pgsql-hackers Subject: Re: automatically generating node support functions In-reply-to: References: <1294462.1656875649@sss.pgh.pa.us> <57df9f30-d2cf-9126-28d4-ae40a2e733a9@enterprisedb.com> <1593978.1656953960@sss.pgh.pa.us> <2592455.1657140387@sss.pgh.pa.us> <3302658.1657288366@sss.pgh.pa.us> <3488143.1657310625@sss.pgh.pa.us> <11148777-fbe2-5188-195d-48f5083573c5@enterprisedb.com> <20220710214622.haiektrjzisob6rl@awork3.anarazel.de> <815831.1657494597@sss.pgh.pa.us> <45f508cb-e30b-c252-e081-4548deafa34c@enterprisedb.com> <1116889.1657553859@sss.pgh.pa.us> <1201553.1657562258@sss.pgh.pa.us> Comments: In-reply-to Robert Haas message dated "Mon, 11 Jul 2022 14:17:44 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1229445.1657569262.1@sss.pgh.pa.us> Date: Mon, 11 Jul 2022 15:54:22 -0400 Message-ID: <1229446.1657569262@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Robert Haas writes: > On Mon, Jul 11, 2022 at 1:57 PM 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. > I think this is a valid concern, but having it be automatically > generated is awfully handy, so I think it would be nice to find some > way of preserving that. Agreed. The fundamental problem seems to be that each build toolchain has its own source of truth about the file processing order, but we now see that there had better be only one. We could make the sole source of truth about that be gen_node_support.pl itself, I think. We can't simply move the file list into gen_node_support.pl, because (a) the build system has to know about the dependencies involved, and (b) gen_node_support.pl wouldn't know what to do in VPATH situations. However, we could have gen_node_support.pl contain a canonical list of the files it expects to be handed, and make it bitch if its arguments don't match that. That's ugly I admit, but the set of files of interest doesn't change so often that maintaining one additional copy would be a big problem. Anybody got a better idea? regards, tom lane