Re: Fix misaligned access of ItemPointerData on ARM

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Piotr Stefaniak <postgres(at)piotr-stefaniak(dot)me>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Fix misaligned access of ItemPointerData on ARM
Date: 2015-05-21 19:34:00
Message-ID: 1005.1432236840@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Piotr Stefaniak <postgres(at)piotr-stefaniak(dot)me> writes:
> But due to how ExecRowMark struct is laid out in memory, the packed
> struct ItemPointerData begins at an uneven offset, leading to misaligned
> access whenever BlockIdData is set by ItemPointerSetInvalid() (and
> likely in some other places, too).

But BlockIdData is laid out and accessed as two 16-bit fields, so there
should be no problem. On what platform exactly do you see a failure?

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephen Frost 2015-05-21 19:35:27 Re: INSERT ... ON CONFLICT DO UPDATE with _any_ constraint
Previous Message Feng Tian 2015-05-21 19:33:19 Re: Float/Double cast to int