| От | 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 по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера