Re: general design question - Mailing list pgsql-general

From Tom Lane
Subject Re: general design question
Date
Msg-id 19203.1019280428@sss.pgh.pa.us
Whole thread Raw
In response to Re: general design question  (Curt Sampson <cjs@cynic.net>)
List 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 by date:

Previous
From: Curt Sampson
Date:
Subject: Re: general design question
Next
From: Martijn van Oosterhout
Date:
Subject: Re: general design question