Re: Question regarding the database page layout.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Question regarding the database page layout.
Дата
Msg-id 15742.1220374924@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Question regarding the database page layout.  ("Ryan Bradetich" <rbradetich@gmail.com>)
Ответы Re: Question regarding the database page layout.
Список pgsql-hackers
"Ryan Bradetich" <rbradetich@gmail.com> writes:
> On Tue, Sep 2, 2008 at 8:07 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> It's conceivable that we could make this work if we wanted to dedicate
>> an infomask bit to showing whether the tuple needs int or double
>> alignment.  I don't really think it's worth the trouble though.

> I am not sure what an infomask bit is yet, but is it safe to assume
> (in theory) that if I get the
> page written correctly, that the tuple reading code would work because
> of the t_hoff field?

Well, as Greg pointed out, setting t_hoff correctly should be sufficient
for squeezing out useless padding between the tuple header and the tuple
data.  The real objection here is that that's leaving most of the
possible gain still on the table.  The tuple *as a whole* (header and
data both) is still going to get maxaligned when it's plopped onto a
disk page.  I think that in real-world cases that's often where the
main padding cost comes in: with 23-byte tuple headers and no OIDs,
you aren't saving a thing by int-aligning t_hoff unless you have a nulls
bitmap and it's the wrong number of bytes long.

So IMHO the real problem is over near PageAddItem.
        regards, tom lane


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

Предыдущее
От: Gregory Stark
Дата:
Сообщение: Re: Question regarding the database page layout.
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: Window functions patch v04 for the September commit fest