Re: Fix misaligned access of ItemPointerData on ARM

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Fix misaligned access of ItemPointerData on ARM
Дата
Msg-id 3345.1432241367@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Fix misaligned access of ItemPointerData on ARM  (Andrew Dunstan <andrew@dunslane.net>)
Ответы Re: Fix misaligned access of ItemPointerData on ARM  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
Andrew Dunstan <andrew@dunslane.net> writes:
> On 05/21/2015 04:08 PM, Tom Lane wrote:
>> I wonder whether we should drop the ARM assumption and instead write
>> 
>> #if defined(pg_attribute_packed) && defined(pg_attribute_aligned)
>> pg_attribute_packed()
>> pg_attribute_aligned(2)
>> #endif
>> 
>> so that the annotations are applied on every compiler that accepts them.

> Sounds reasonable.

We can try it and see if the buildfarm blows up, at least.

I considered also adding a Static_assert about sizeof(ItemIdData),
but I'm afraid that compilers that don't support these pragmas
probably don't support Static_assert either, so it's not clear
that that would catch anything.
        regards, tom lane



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

Предыдущее
От: Peter Geoghegan
Дата:
Сообщение: Re: INSERT ... ON CONFLICT DO UPDATE with _any_ constraint
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: INSERT ... ON CONFLICT DO UPDATE with _any_ constraint