From: Zdenek Kotala <Zdenek.Kotala@Sun.COM>
To: Heikki Linnakangas <heikki@enterprisedb.com>
Cc: Pavan Deolasee <pavan.deolasee@gmail.com>
Cc: PostgreSQL-patches <pgsql-patches@postgresql.org>
Subject: Re: page macros cleanup
Date: Fri, 04 Jul 2008 13:47:00 +0200
Message-ID: <486E0DB4.9030400@sun.com> (raw)
In-Reply-To: <486E070D.8010101@enterprisedb.com>
References: <48529B83.9010907@sun.com>
<2e78013d0807030450m4cab60d0jd99d1acce59fae56@mail.gmail.com>
<486DD1D1.50604@sun.com>
<2e78013d0807040150w393ad72codaf06a6ac12a83ce@mail.gmail.com>
<486DF644.4070604@enterprisedb.com>
<486E008F.3080304@sun.com>
<486E070D.8010101@enterprisedb.com>
Heikki Linnakangas napsal(a):
> Zdenek Kotala wrote:
>> By my opinion first place where tuple should be placed is:
>>
>> MAXALIGN(SizeOfPageHeaderData + sizeof(ItemIdData))
>
> Yeah, but we don't enforce that directly. We enforce it by MAXALIGNing
> size in PageAddItem, and with the rule that special-size is MAXALIGNed.
Yeah, it is implication from other rules. But how Pavan mentioned and I agree
with him. We should have *MaxItemSize value maxaligned, because tuple is
maxaligned anyway and *MaxItemSize defines real limit.
>
> Come to think of it, why do we require MAXALIGN alignment of tuples? I
> must be missing something, but AFAICS the widest fields in
> HeapTupleHeaderData are 4-bytes wide, so it should be possible to get
> away with 4-byte alignment.
>
I think that you have problem to make correct decision about padding between
header and first data item on platform where MAXALIGN is 8. Padding will depends
on align of offset - if it is max aligned or not. It will have effect for
example on SPARC but it adds extra complexity to code. ... Maybe only set hoff
correctly when new tuple is created ...
Another improvement should be reorder column to got best space allocation during
create table (of course it affect select * from).
Zdenek
--
Zdenek Kotala Sun Microsystems
Prague, Czech Republic http://sun.com/postgresql
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-patches@postgresql.org
Cc: Zdenek.Kotala@Sun.COM, heikki@enterprisedb.com, pavan.deolasee@gmail.com
Subject: Re: page macros cleanup
In-Reply-To: <486E0DB4.9030400@sun.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox