Re: page macros cleanup

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: page macros cleanup
Дата
Msg-id 486CDC83.7060609@enterprisedb.com
обсуждение исходный текст
Ответ на page macros cleanup  (Zdenek Kotala <Zdenek.Kotala@Sun.COM>)
Ответы Re: page macros cleanup  (Zdenek Kotala <Zdenek.Kotala@Sun.COM>)
Список 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

В списке pgsql-patches по дате отправления:

Предыдущее
От: "Heikki Linnakangas"
Дата:
Сообщение: Re: EXPLAIN progress info
Следующее
От: Tom Lane
Дата:
Сообщение: Re: pg_dump lock timeout