Re: Potential ABI breakage in upcoming minor releases

Поиск
Список
Период
Сортировка
От Noah Misch
Тема Re: Potential ABI breakage in upcoming minor releases
Дата
Msg-id 20241114163632.67.nmisch@google.com
обсуждение исходный текст
Ответ на Re: Potential ABI breakage in upcoming minor releases  (Peter Eisentraut <peter@eisentraut.org>)
Ответы Re: Potential ABI breakage in upcoming minor releases
Список 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 по дате отправления: