Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wD4kO-002Zwj-29 for pgsql-hackers@arkaria.postgresql.org; Wed, 15 Apr 2026 18:13:57 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wD4kN-001KlN-1W for pgsql-hackers@arkaria.postgresql.org; Wed, 15 Apr 2026 18:13:55 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wD4kN-001KlF-0d for pgsql-hackers@lists.postgresql.org; Wed, 15 Apr 2026 18:13:55 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wD4kK-00000001GYf-2P2K for pgsql-hackers@lists.postgresql.org; Wed, 15 Apr 2026 18:13:54 +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 63FIDklh2095867 for ; Wed, 15 Apr 2026 14:13:46 -0400 From: Tom Lane To: pgsql-hackers@lists.postgresql.org Subject: Re: Do we still need gen_node_support.pl's nodetag ABI stability check? In-reply-to: <1458883.1776143073@sss.pgh.pa.us> References: <1458883.1776143073@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Tue, 14 Apr 2026 01:04:33 -0400" MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----- =_aaaaaaaaaa0" Content-ID: <2095839.1776276807.0@sss.pgh.pa.us> Date: Wed, 15 Apr 2026 14:13:46 -0400 Message-ID: <2095866.1776276826@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk ------- =_aaaaaaaaaa0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2095839.1776276807.1@sss.pgh.pa.us> I wrote: > We're still a couple months away from cutting the REL_19_STABLE > branch, but I was contemplating that just now, and it occurred to me > to wonder whether we still need gen_node_support.pl's single-purpose > ABI check (cf commit eea9fa9b2) now that we have buildfarm animals > running general-purpose ABI stability checks. > On the one hand, there's much to be said for belt-and-suspenders-too > safety checks. On the other hand, updating gen_node_support.pl is > an extra manual step while creating a branch, so it's easy to forget > or get wrong. It's also not very clear why this particular sort > of ABI break in a stable branch is any worse than other hazards. > I'm not really set either way, but my first thought is to drop > the special mechanism. Hearing no objections, I went ahead and wrote a patch for that. Doing that reminded me that it's a really incomplete check anyway, as it only verifies that the last auto-assigned NodeTag number hasn't changed. Re-ordering earlier entries, for example, would not get detected. So even on its own terms it's little more than a stopgap; the buildfarm's libabigail checks are far more thorough. Barring objections, I'll push this soon. regards, tom lane ------- =_aaaaaaaaaa0 Content-Type: text/x-diff; name*0="v1-0001-Remove-gen_node_support.pl-s-ad-hoc-ABI-stability.p"; name*1="atch"; charset="us-ascii" Content-ID: <2095839.1776276807.2@sss.pgh.pa.us> Content-Description: v1-0001-Remove-gen_node_support.pl-s-ad-hoc-ABI-stability.patch Content-Transfer-Encoding: quoted-printable =46rom c01ddb5be22c5e2fd1ed7ee429ae489da8d4f0b2 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Wed, 15 Apr 2026 14:08:12 -0400 Subject: [PATCH v1] Remove gen_node_support.pl's ad-hoc ABI stability chec= k. We installed this in commit eea9fa9b2 to protect against foreseeable mistakes that would break ABI in stable branches by renumbering NodeTag enum entries. However, we now have much more thorough ABI stability checks thanks to buildfarm members using libabigail (see the .abi-compliance-history mechanism). So this incomplete, single-purpose check seems like an anachronism. I wouldn't object to keeping it were it not that it requires an additional manual step when making a new stable git branch. That seems like something easy to screw up, so let's get rid of it. This patch just removes the logic that checks for changes in the last auto-assigned NodeTag value. We still need eea9fa9b2's cross-check on the supplied list of header files, to prevent divergence between the makefile and meson build systems. We'll also sometimes need the nodetag_number() infrastructure for hand-assigning new NodeTags in stable branches. Discussion: https://postgr.es/m/1458883.1776143073@sss.pgh.pa.us --- src/backend/nodes/gen_node_support.pl | 25 +------------------------ src/tools/RELEASE_CHANGES | 4 ---- 2 files changed, 1 insertion(+), 28 deletions(-) diff --git a/src/backend/nodes/gen_node_support.pl b/src/backend/nodes/gen= _node_support.pl index a21f5a754bf..f4b1317e99f 100644 --- a/src/backend/nodes/gen_node_support.pl +++ b/src/backend/nodes/gen_node_support.pl @@ -96,20 +96,6 @@ my @nodetag_only_files =3D qw( nodes/supportnodes.h ); = -# ARM ABI STABILITY CHECK HERE: -# -# In stable branches, set $last_nodetag to the name of the last node type -# that should receive an auto-generated nodetag number, and $last_nodetag= _no -# to its number. (Find these values in the last line of the current -# nodetags.h file.) The script will then complain if those values don't -# match reality, providing a cross-check that we haven't broken ABI by -# adding or removing nodetags. -# In HEAD, these variables should be left undef, since we don't promise -# ABI stability during development. - -my $last_nodetag =3D undef; -my $last_nodetag_no =3D undef; - # output file names my @output_files; = @@ -615,30 +601,21 @@ open my $nt, '>', "$output_path/nodetags.h$tmpext" printf $nt $header_comment, 'nodetags.h'; = my $tagno =3D 0; -my $last_tag =3D undef; foreach my $n (@node_types, @extra_tags) { next if elem $n, @abstract_types; if (defined $manual_nodetag_number{$n}) { - # do not change $tagno or $last_tag + # do not change $tagno print $nt "\tT_${n} =3D $manual_nodetag_number{$n},\n"; } else { $tagno++; - $last_tag =3D $n; print $nt "\tT_${n} =3D $tagno,\n"; } } = -# verify that last auto-assigned nodetag stays stable -die "ABI stability break: last nodetag is $last_tag not $last_nodetag\n" - if (defined $last_nodetag && $last_nodetag ne $last_tag); -die - "ABI stability break: last nodetag number is $tagno not $last_nodetag_n= o\n" - if (defined $last_nodetag_no && $last_nodetag_no !=3D $tagno); - close $nt; = = diff --git a/src/tools/RELEASE_CHANGES b/src/tools/RELEASE_CHANGES index f0d005a6141..653318fd770 100644 --- a/src/tools/RELEASE_CHANGES +++ b/src/tools/RELEASE_CHANGES @@ -118,10 +118,6 @@ Starting a New Development Cycle * In the newly-made branch, replace "devel" with the branch's major versi= on number in the URLs appearing in the top-level README and Makefile files= . = -* In the newly-made branch, change src/backend/nodes/gen_node_support.pl - to enforce ABI stability of the NodeTag list (see "ARM ABI STABILITY - CHECK HERE" therein). - * Notify the private committers email list, to ensure all committers are aware of the new branch even if they're not paying close attention to pgsql-hackers. -- = 2.43.7 ------- =_aaaaaaaaaa0--