Re: Fix misaligned access of ItemPointerData on ARM - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Fix misaligned access of ItemPointerData on ARM
Date
Msg-id 3345.1432241367@sss.pgh.pa.us
Whole thread Raw
In response to Re: Fix misaligned access of ItemPointerData on ARM  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: Fix misaligned access of ItemPointerData on ARM  (Andres Freund <andres@anarazel.de>)
List 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 by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: INSERT ... ON CONFLICT DO UPDATE with _any_ constraint
Next
From: Simon Riggs
Date:
Subject: Re: INSERT ... ON CONFLICT DO UPDATE with _any_ constraint