Re: BRIN page type identifier

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: BRIN page type identifier
Дата
Msg-id 20150310033642.GW3291@alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: BRIN page type identifier  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
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

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Kouhei Kaigai
Дата:
Сообщение: Re: Join push-down support for foreign tables
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BRIN page type identifier