Re: Potential ABI breakage in upcoming minor releases - Mailing list pgsql-hackers

From Noah Misch
Subject Re: Potential ABI breakage in upcoming minor releases
Date
Msg-id 20241114163632.67.nmisch@google.com
Whole thread Raw
In response to Re: Potential ABI breakage in upcoming minor releases  (Peter Eisentraut <peter@eisentraut.org>)
Responses Re: Potential ABI breakage in upcoming minor releases
List pgsql-hackers
On Thu, Nov 14, 2024 at 05:13:35PM +0100, Peter Eisentraut wrote:
> On 14.11.24 15:35, Noah Misch wrote:
> > The postgr.es/c/e54a42a standard would have us stop here.  But I'm open to
> > treating the standard as mistaken and changing things.
> 
> That text explicitly calls out that adding struct members at the end of a
> struct is considered okay.  But thinking about it now, even adding fields to
> the end of a node struct that extensions allocate using makeNode() is an ABI
> break

Right.  makeNode(), palloc(sizeof), and stack allocation have that problem.
Allocation wrappers like CreateExecutorState() avoid the problem.  More
generally, structs allocated in non-extension code are fine.



pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: Potential ABI breakage in upcoming minor releases
Next
From: Aleksander Alekseev
Date:
Subject: Re: Potential ABI breakage in upcoming minor releases