Skip site navigation (1) Skip section navigation (2)

Re: page macros cleanup (ver 04)

From: Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM>
To: Pavan Deolasee <pavan(dot)deolasee(at)gmail(dot)com>
Cc: Heikki Linnakangas <heikki(at)enterprisedb(dot)com>, PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: page macros cleanup (ver 04)
Date: 2008-07-04 12:11:59
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-patches
Pavan Deolasee napsal(a):
> On Fri, Jul 4, 2008 at 4:25 PM, Heikki Linnakangas
> <heikki(at)enterprisedb(dot)com> wrote:
>> No, there's a itemsz = MAXALIGN(itemsz) call before the check against
>> HashMaxItemSize.
> Ah, right. Still should we just not MAXALIGN_DOWN the Max size to
> reflect the practical limit on the itemsz ? It's more academical
> though, so not a big deal.

Finally I use following formula:

#define HashMaxItemSize(page) \
  	MAXALIGN_DOWN(PageGetPageSize(page) - \
  	  ( SizeOfPageHeaderData + sizeof(ItemIdData) ) - \
  	   MAXALIGN(sizeof(HashPageOpaqueData)) )

I did not replace PageGetPageSize(page), because other *MaxItemSize has same 

Revised patch is attached.


Zdenek Kotala              Sun Microsystems
Prague, Czech Republic

Attachment: page_04.patch
Description: text/x-patch (33.4 KB)

In response to


pgsql-patches by date

Next:From: Heikki LinnakangasDate: 2008-07-04 12:20:45
Subject: Re: Relation forks & FSM rewrite patches
Previous:From: Zdenek KotalaDate: 2008-07-04 11:47:00
Subject: Re: page macros cleanup

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group