"Michael Richards" <miker@interchange.ca> writes:
> Is this alignment relative to the beginning of the page or tuple, or even
> the tuple data area (after the tuple header)?
Well, it's absolute: on machines that care about such things, you *will*
coredump if you try to fetch an int at a non-4-byte-aligned address.
Our implementation forces tuple data area (also tuple header) to start
at a MAXALIGN'd offset in the page, and we ensure that page buffers
start at MAXALIGN'd addresses. So the attribute access routines only
have to worry about suitable alignment of the field's offset within the
tuple data. You'd get the same answer however you measured it, but
I think the code usually does the alignment computation on the offset
within the tuple data.
regards, tom lane