Re: Optimization of the alignment padding

From: ITAGAKI Takahiro <itagaki(dot)takahiro(at)lab(dot)ntt(dot)co(dot)jp>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Alvaro Herrera <alvherre(at)commandprompt(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Optimization of the alignment padding
Date: 2005-11-10 01:42:53
Message-ID: 20051110101314.447F.ITAGAKI.TAKAHIRO@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> > There was a discussion during the 8.1 devel cycle about shortening the
> > HeapTupleHeader struct.
>
> It would, in fact, largely eliminate the point of this patch, since the
> standard header size would go back to being a multiple of 8.

Yes, I know the discussion, but I think it and this patch don't conflict.
These spaces don't disappear completely even if the shortening improvement
has done, ex. for tuples that have 2 bytes or more null-bitmaps.

> the internal padding within the tuple depends on what
> alignment the start was at

Tuple headers must be located at a MAXALIGN boundary,
so internal padding does not change as long as a relative position
between the header and the first field is fixed.

but...

> It will probably actually break some
> places, because I think we sometimes attach a data area to a separately
> created header.

Thanks, I didn't consider it.
I'll check the cases and whether they can be resolved.

---
ITAGAKI Takahiro
NTT Cyber Space Laboratories

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Rod Taylor 2005-11-10 01:50:39 Re: Comments from a Firebird user via Borland Newsgroups.
Previous Message Tony Caduto 2005-11-10 01:35:30 Comments from a Firebird user via Borland Newsgroups.