Re: general design question

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Curt Sampson <cjs(at)cynic(dot)net>
Cc: jtp <john(at)akadine(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: general design question
Date: 2002-04-20 05:27:08
Message-ID: 19203.1019280428@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Curt Sampson <cjs(at)cynic(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Martijn van Oosterhout 2002-04-20 07:11:13 Re: general design question
Previous Message Curt Sampson 2002-04-20 04:55:38 Re: general design question

Browse pgsql-hackers by date

  From Date Subject
Next Message Martijn van Oosterhout 2002-04-20 07:11:13 Re: general design question
Previous Message Tom Lane 2002-04-20 05:03:14 Re: Improved scanner performance