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.