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

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 (view raw or flat)
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

pgsql-patches by date

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

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