Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 67B65650E87 for ; Thu, 3 Jul 2008 11:05:00 -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 21225-06 for ; Thu, 3 Jul 2008 11:04:49 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail01.enterprisedb.com (mail01.enterprisedb.com [63.246.7.168]) by postgresql.org (Postfix) with ESMTP id 95C5164FD64 for ; Thu, 3 Jul 2008 11:04:55 -0300 (ADT) thread-index: AcjdFeIOEr+LYEQLQY2jWwh0VGAu1A== Content-Class: urn:content-classes:message Importance: normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.4133 Received: from [80.222.70.18] ([80.222.70.18]) by mail01.enterprisedb.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959); Thu, 3 Jul 2008 10:05:43 -0400 Message-ID: <486CDC83.7060609@enterprisedb.com> Date: Thu, 03 Jul 2008 17:04:51 +0300 From: "Heikki Linnakangas" Organization: EnterpriseDB User-Agent: Mozilla-Thunderbird 2.0.0.14 (X11/20080509) MIME-Version: 1.0 To: "Zdenek Kotala" Cc: "PostgreSQL-patches" Subject: Re: page macros cleanup References: <48529B83.9010907@sun.com> In-Reply-To: <48529B83.9010907@sun.com> Content-Type: text/plain; format=flowed; charset="UTF-8" Content-Transfer-Encoding: 8bit X-OriginalArrivalTime: 03 Jul 2008 14:05:43.0593 (UTC) FILETIME=[E2029190:01C8DD15] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200807/32 X-Sequence-Number: 6727 Just one quick note: Zdenek Kotala wrote: > *** pgsql.orig.da8c485e0e2a/src/backend/access/gist/gistutil.c pá črn 13 18:00:35 2008 > --- pgsql.orig/src/backend/access/gist/gistutil.c pá črn 13 18:00:35 2008 > *************** > *** 592,598 **** > /* > * Additionally check that the special area looks sane. > */ > ! if (((PageHeader) (page))->pd_special != > (BLCKSZ - MAXALIGN(sizeof(GISTPageOpaqueData)))) > ereport(ERROR, > (errcode(ERRCODE_INDEX_CORRUPTED), > --- 592,598 ---- > /* > * Additionally check that the special area looks sane. > */ > ! if ( PageGetSpecialPointer(page) - page != > (BLCKSZ - MAXALIGN(sizeof(GISTPageOpaqueData)))) > ereport(ERROR, > (errcode(ERRCODE_INDEX_CORRUPTED), Should probably use PageGetSpecialSize here. Much simpler, and doesn't assume that the special area is always at the end of page (not that I see us changing that anytime soon). -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com