From: | "Heikki Linnakangas" <heikki(at)enterprisedb(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-03 14:04:51 |
Message-ID: | 486CDC83.7060609@enterprisedb.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-patches |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2008-07-03 15:33:16 | Re: [PATCHES] pg_dump lock timeout |
Previous Message | Heikki Linnakangas | 2008-07-03 13:11:30 | Re: EXPLAIN progress info |