Re: page macros cleanup

From: "Pavan Deolasee" <pavan(dot)deolasee(at)gmail(dot)com>
To: "Zdenek Kotala" <Zdenek(dot)Kotala(at)sun(dot)com>
Cc: PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: page macros cleanup
Date: 2008-07-04 08:50:12
Message-ID: 2e78013d0807040150w393ad72codaf06a6ac12a83ce@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

On Fri, Jul 4, 2008 at 1:01 PM, Zdenek Kotala <Zdenek(dot)Kotala(at)sun(dot)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

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Peter Eisentraut 2008-07-04 08:51:55 Re: [PATCHES] Explain XML patch v2
Previous Message Simon Riggs 2008-07-04 08:44:25 Re: WIP: executor_hook for pg_stat_statements