Tom Lane wrote:
> Alvaro Herrera <alvherre@2ndquadrant.com> writes:
> > typedef struct BrinSpecialSpace
> > {
> >     char        padding[MAXALIGN(1) - 2 * sizeof(uint16)];
> >     uint16        flags;
> >     uint16        type;
> > } BrinSpecialSpace;
>
> I should expect that to fail altogether on 32-bit machines, because
> the declared array size will be zero.
Hah, of course.
> You could try something like
>
> typedef struct BrinSpecialSpace
> {
>     uint16        vector[MAXALIGN(1) / sizeof(uint16)];
> } BrinSpecialSpace;
>
> and then some access macros to use the last and next-to-last
> elements of that array.
Ah, thanks, that works fine on x86-64.  Here's a patch I intend to push
tomorrow.
Heikki suggested that the comment above GinPageOpaqueData be moved to
some better place, but I couldn't find any such.  If there are other
ideas, I'm all ears.
--
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services