pg.ddx.io  pgsql-patches@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Heikki Linnakangas <heikki@enterprisedb.com>
To: Zdenek Kotala <Zdenek.Kotala@Sun.COM>
Cc: PostgreSQL-patches <pgsql-patches@postgresql.org>
Subject: Re: page macros cleanup
Date: Thu, 03 Jul 2008 17:04:51 +0300
Message-ID: <486CDC83.7060609@enterprisedb.com> (raw)
In-Reply-To: <48529B83.9010907@sun.com>
References: <48529B83.9010907@sun.com>

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



view thread (17+ messages)  latest in thread

Message-ID: <486CDC83.7060609@enterprisedb.com>
Permalink:  ../486CDC83.7060609@enterprisedb.com/
Also on:    postgresql.org/message-id/486CDC83.7060609@enterprisedb.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-patches@postgresql.org
  Cc: heikki@enterprisedb.com, Zdenek.Kotala@Sun.COM
  Subject: Re: page macros cleanup
  In-Reply-To: <486CDC83.7060609@enterprisedb.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox