Re: page macros cleanup - Mailing list pgsql-patches

From Pavan Deolasee
Subject Re: page macros cleanup
Date
Msg-id 2e78013d0807040150w393ad72codaf06a6ac12a83ce@mail.gmail.com
Whole thread Raw
In response to Re: page macros cleanup  (Zdenek Kotala <Zdenek.Kotala@Sun.COM>)
Responses Re: page macros cleanup
List pgsql-patches
On Fri, Jul 4, 2008 at 1:01 PM, Zdenek Kotala <Zdenek.Kotala@sun.com> wrote:
>
>
> Good catch. I lost in basic arithmetic. What I see now that original
> definition count sizeof(ItemIdData) twice and on other side it does not take
> care about MAXALING correctly. I think correct formula is:
>
> #define HashMaxItemSize(page) \
>        (PageGetPageSize(page) - \
>          ( MAXALIGN(SizeOfPageHeaderData + sizeof(ItemIdData))+ \
>            MAXALIGN(sizeof(HashPageOpaqueData)) \
>          )\
>         )
>
> What do you think?
>


Yes. I think that's the correct way.


Thanks,
Pavan

--
Pavan Deolasee
EnterpriseDB http://www.enterprisedb.com

pgsql-patches by date:

Previous
From: Teodor Sigaev
Date:
Subject: Re: Multi-column GIN
Next
From: Peter Eisentraut
Date:
Subject: Re: Explain XML patch v2