Re: page macros cleanup - Mailing list pgsql-patches

From Heikki Linnakangas
Subject Re: page macros cleanup
Date
Msg-id 486E070D.8010101@enterprisedb.com
Whole thread Raw
In response to Re: page macros cleanup  (Zdenek Kotala <Zdenek.Kotala@Sun.COM>)
Responses Re: page macros cleanup  (Zdenek Kotala <Zdenek.Kotala@Sun.COM>)
List pgsql-patches
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.

To put it another way, it's possible that there's an unaligned amount of
free space on a page, as returned by PageGetExactFreeSpace. But since
item size is always MAXALIGNed, it's impossible to use it all.


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.

--
   Heikki Linnakangas
   EnterpriseDB   http://www.enterprisedb.com

pgsql-patches by date:

Previous
From: Zdenek Kotala
Date:
Subject: Re: page macros cleanup
Next
From: Zdenek Kotala
Date:
Subject: Re: page macros cleanup