Re: Expanding the use of FLEXIBLE_ARRAY_MEMBER for declarations like foo[1] - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Expanding the use of FLEXIBLE_ARRAY_MEMBER for declarations like foo[1]
Date
Msg-id 8226.1424549815@sss.pgh.pa.us
Whole thread Raw
In response to Re: Expanding the use of FLEXIBLE_ARRAY_MEMBER for declarations like foo[1]  (Michael Paquier <michael.paquier@gmail.com>)
Responses Re: Expanding the use of FLEXIBLE_ARRAY_MEMBER for declarations like foo[1]  (Andres Freund <andres@2ndquadrant.com>)
List pgsql-hackers
Michael Paquier <michael.paquier@gmail.com> writes:
> And after all those commits attached is a patch changing
> HeapTupleHeaderData, using the following macro to track the size of
> the structure:
> #define SizeofHeapTupleHeader offsetof(HeapTupleHeaderData, t_bits)

I've pushed this with a few minor fixes (mostly, using MAXALIGN where
appropriate to avoid changing the results of planner calculations).

Andres, would you double-check the changes in reorderbuffer.c?
There were some weird calculations with 
offsetof(ReorderBufferTupleBuf, data) - offsetof(HeapTupleHeaderData, t_bits)
which Michael simplified in a way that's not 100% equivalent.  I think
it's probably better this way; it looks like the old coding was maybe
wrong, or at least in the habit of misaligning data.  But I might be
misunderstanding.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: Abbreviated keys for Numeric
Next
From: Peter Geoghegan
Date:
Subject: Re: INSERT ... ON CONFLICT {UPDATE | IGNORE} 2.0