Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id B5E19650E8A for ; Fri, 4 Jul 2008 05:50:17 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 73883-10 for ; Fri, 4 Jul 2008 05:50:11 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from yw-out-2324.google.com (yw-out-2324.google.com [74.125.46.29]) by postgresql.org (Postfix) with ESMTP id BD655650E23 for ; Fri, 4 Jul 2008 05:50:13 -0300 (ADT) Received: by yw-out-2324.google.com with SMTP id 3so483056ywj.73 for ; Fri, 04 Jul 2008 01:50:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=ZErrwHpavdCBGK5ljLbO/wdjJY7LRD12NcrBoWooXZY=; b=OHFgFhx7u7j1dDHfjixZOydkFOhVUjdBx79kxqhQFnxX8sS+WaVKZNzouvfcHJWMmX DStmy6lN/jipJFnFuFz40wxn2uKCUrShBXhNPQ5EHdztk08IY1Ra7YsjXLx0An0p5to/ ByggQOzt3hWTpOHamdFEAltc/7PjpUmbFUi2A= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=QoAR6bplSe/SjZb6D0a+STVecZufZxWncb/kPIRfK3FuV4wIgG8O/QO9WzJkamxU+5 95hqDNH70V2uZrSJz75pzT3IhiSRpOyoEaqLK+I0wQaPQnu80HNB0j4VDOptCRz52okK fwuEShNCpyicIclTH6TqG9SlQxfEGy2m9lVco= Received: by 10.150.52.2 with SMTP id z2mr1554419ybz.47.1215161412526; Fri, 04 Jul 2008 01:50:12 -0700 (PDT) Received: by 10.151.84.7 with HTTP; Fri, 4 Jul 2008 01:50:12 -0700 (PDT) Message-ID: <2e78013d0807040150w393ad72codaf06a6ac12a83ce@mail.gmail.com> Date: Fri, 4 Jul 2008 14:20:12 +0530 From: "Pavan Deolasee" To: "Zdenek Kotala" Subject: Re: page macros cleanup Cc: PostgreSQL-patches In-Reply-To: <486DD1D1.50604@sun.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <48529B83.9010907@sun.com> <2e78013d0807030450m4cab60d0jd99d1acce59fae56@mail.gmail.com> <486DD1D1.50604@sun.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200807/45 X-Sequence-Number: 6740 On Fri, Jul 4, 2008 at 1:01 PM, Zdenek Kotala 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