Re: Question regarding the database page layout.

From: Gregory Stark <stark(at)enterprisedb(dot)com>
To: "Ryan Bradetich" <rbradetich(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Question regarding the database page layout.
Date: 2008-09-02 15:30:43
Message-ID: 87vdxesgyk.fsf@oxford.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Ryan Bradetich" <rbradetich(at)gmail(dot)com> writes:

> 4. If require_max_align = true, use the MAXALIGN macro; otherwise
> use the INTALIGN macro.

Huh, I didn't think of doing it like that.

But I'm confused. You seem to be tweaking the alignment of the data inside the
tuple? After the tuple header? I thought we had only one byte of wasted space
in there and that's used by the null bitmap. So unless you have more than 8
columns and some of them are null I wouldn't expect you to save any space. If
you do then I guess you could save 4 bytes if the null bitmap is 2-5 bytes
(mod 8) long.

I thought the goal was to save space by aligning the tuples on the page more
densely. That seems to me to be more fruitful as about half the tuples will
save four bytes even on tables with small or missing null bitmaps.

--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
Ask me about EnterpriseDB's 24x7 Postgres support!

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Gregory Stark 2008-09-02 15:37:37 Re: Question regarding the database page layout.
Previous Message Gregory Stark 2008-09-02 15:22:57 Re: [PATCH] Cleanup of GUC units code