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.94.2) (envelope-from ) id 1tC6iZ-00BmW2-3e for pgsql-hackers@arkaria.postgresql.org; Sat, 16 Nov 2024 00:31:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tC6iU-00Chp9-RL for pgsql-hackers@arkaria.postgresql.org; Sat, 16 Nov 2024 00:31:11 +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.94.2) (envelope-from ) id 1tC6iU-00Chp1-HU for pgsql-hackers@lists.postgresql.org; Sat, 16 Nov 2024 00:31:11 +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.94.2) (envelope-from ) id 1tC6iR-002AGu-1x for pgsql-hackers@postgresql.org; Sat, 16 Nov 2024 00:31:10 +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 4AG0Uukm2638277; Fri, 15 Nov 2024 19:30:56 -0500 From: Tom Lane To: "David E. Wheeler" cc: Noah Misch , Aleksander Alekseev , pgsql-hackers , Marco Slot , Alvaro Herrera , Christoph Berg , Pavan Deolasee Subject: Re: Potential ABI breakage in upcoming minor releases In-reply-to: <900DE0C9-48C4-474C-BDC9-AD495D8D3F59@justatheory.com> References: <1976928.1731614974@sss.pgh.pa.us> <202411142033.u6za5a6ylj2k@alvherre.pgsql> <20241114224108.d0.nmisch@google.com> <2443809.1731683394@sss.pgh.pa.us> <20241115175223.68.nmisch@google.com> <2483970.1731702561@sss.pgh.pa.us> <2500050.1731705196@sss.pgh.pa.us> <900DE0C9-48C4-474C-BDC9-AD495D8D3F59@justatheory.com> Comments: In-reply-to "David E. Wheeler" message dated "Fri, 15 Nov 2024 19:00:02 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <2638275.1731717056.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Fri, 15 Nov 2024 19:30:56 -0500 Message-ID: <2638276.1731717056@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk "David E. Wheeler" writes: > On Nov 15, 2024, at 16:13, Tom Lane wrote: >> In other words, our current guidelines >> for preserving ABI compatibility actually *created* this disaster, >> because the HEAD change was fine from an ABI standpoint but what >> was done in back branches was not. So we do need to rethink how >> that's worded. > What bit is mis-worded? The guidance Peter committed[1] says that =E2=80= =9CPostgreSQL makes an effort to avoid server > ABI breaks in minor releases.=E2=80=9D That text says exactly nothing about what specific code changes to make or not make. I'm not sure offhand where (or if) we have this documented, but there's an idea that adding fields at the end of a struct is safer ABI-wise than putting them in the middle. Which is true if you can't squeeze them into padding space. Here, that could have been done and probably should have. The other bit of documentation we probably need is some annotation in struct ResultRelInfo saying "do not change the sizeof() this struct in back branches, period". regards, tom lane