Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id EB168650EA5 for ; Fri, 4 Jul 2008 07: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 93099-02 for ; Fri, 4 Jul 2008 07:50:08 -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.30]) by postgresql.org (Postfix) with ESMTP id 121FD650E99 for ; Fri, 4 Jul 2008 07:50:08 -0300 (ADT) Received: by yw-out-2324.google.com with SMTP id 3so499473ywj.73 for ; Fri, 04 Jul 2008 03:50:03 -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=YjdJovws9zoIKejrznwckJPUIe2ZWTb8GMS8omcF5vE=; b=HxmlLVefCAlpDgfkfHZGORqeUyJCGWRbimXrWTJA9RH7zrVp+GLZmCEipy1COIvnxe L09hRH7OTNE7fSk1VzbvGKaMXRiaBEteqjBvGlbobgCSp2clS2eowm4kby2dBzrX2WTe o9r001zPURT8iWHXBn9MRmbwZROBAp8QwtZV8= 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=Q5nK66K3A4J2G0dkxr99gkI3UptEOAkwZMGhaj/3kEjaiwUD/VO/PFN3ia5o/E5kdB vOULthGyNdIh/YcNsVuTdPrKlPrW23/F/WvX2F5cANgxC2zXdjlgYKlgv3iuNNXGo54v nmHM8HebpGpWsLcwd7H3QieHR2TEQHbCJqawo= Received: by 10.150.134.21 with SMTP id h21mr1683286ybd.156.1215168603760; Fri, 04 Jul 2008 03:50:03 -0700 (PDT) Received: by 10.151.84.7 with HTTP; Fri, 4 Jul 2008 03:50:03 -0700 (PDT) Message-ID: <2e78013d0807040350m3b2913cfkceaa70d8f9d697c2@mail.gmail.com> Date: Fri, 4 Jul 2008 16:20:03 +0530 From: "Pavan Deolasee" To: "Heikki Linnakangas" Subject: Re: page macros cleanup Cc: "Zdenek Kotala" , PostgreSQL-patches In-Reply-To: <486DF644.4070604@enterprisedb.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> <2e78013d0807040150w393ad72codaf06a6ac12a83ce@mail.gmail.com> <486DF644.4070604@enterprisedb.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200807/57 X-Sequence-Number: 6751 On Fri, Jul 4, 2008 at 3:37 PM, Heikki Linnakangas wrote: > > > I think this is the way it should be: > > #define HashMaxItemSize \ > (BLCKSZ - \ > SizeOfPageHeaderData - \ > MAXALIGN(sizeof(HashPageOpaqueData)) - \ > sizeof(ItemIdData)) > I am wondering if this would fail for corner case if HashMaxItemSize happened to be unaligned. For example, if (itemsz < HashMaxItemSize < MAXALIGN(itemsz), PageAddItem() would later fail with a not-so-obvious error. Should we just MAXALIGN_DOWN the HashMaxItemSize ? Thanks, Pavan -- Pavan Deolasee EnterpriseDB http://www.enterprisedb.com