Re: Attribute Alignment

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Attribute Alignment
Дата
Msg-id 26957.977093146@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Attribute Alignment  ("Michael Richards" <miker@interchange.ca>)
Список pgsql-hackers
"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


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

Предыдущее
От: Hannu Krosing
Дата:
Сообщение: Re: Tuple data
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Who is a maintainer of GiST code ?