Re: Attribute Alignment

Поиск
Список
Период
Сортировка
От Michael Richards
Тема Re: Attribute Alignment
Дата
Msg-id 058a01c0687d$95398770$0200a8c0@digitallis
обсуждение исходный текст
Ответ на More Tuple Madness  ("Michael Richards" <miker@interchange.ca>)
Ответы Re: Attribute Alignment  ("Ross J. Reedstrom" <reedstrm@rice.edu>)
Список pgsql-hackers
Okay. On this particular machine, the way I was loading in the page it
properly aligns the data to the page beginning, so I used that. I now have
it extracting meaningful data from a variety of tables. The very last thing
I need to do now is figure out where the code in the source is that stores
and retrieves timestamp and datetime fields (as I'm unsure how they are
encoded).

Having written this tool which is at least the basis for a complete table
data verification program (it's written in c++) I'm wondering if there is
any chance of having it pointed to, linked to or otherwise made available?
Time-permitting I may add to it in the future, although I hope I'll never
have to use it again :)

-Michael

> 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 по дате отправления:

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