Re: general design question

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: general design question
Дата
Msg-id 19203.1019280428@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: general design question  (Curt Sampson <cjs@cynic.net>)
Список pgsql-general
Curt Sampson <cjs@cynic.net> writes:
> ... Then we could declare that all tuples must be aligned on a
> four-byte boundary, use the top 14 bits of a 16-bit line pointer as the
> address, and the bottom two bits for the LP_USED and LP_DELETED flag.
> This would slightly simplify the code for determining the flags, and
> incidently boost the maximum page size to 64K.

Hmm.  Maybe, but the net effect would only be to reduce the minimum row
overhead from 36 to 34 bytes.  Not sure it's worth worrying about.
Eliminating redundancy from the item headers has its downside, too,
in terms of ability to detect problems.

> ... I don't see why we would then
> need the LP_DELETED flag at all.

I believe we do want to distinguish three states: live tuple, dead
tuple, and empty space.  Otherwise there will be cases where you're
forced to move data immediately to collapse empty space, when there's
not a good reason to except that your representation can't cope.

> Hm. I guess this really should be on hackers, shouldn't it?

Yup...

            regards, tom lane

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

Предыдущее
От: Curt Sampson
Дата:
Сообщение: Re: general design question
Следующее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: general design question