pgsql: GIN's ItemPointerIsMin, ItemPointerIsMax, and - Mailing list pgsql-committers

From tgl@postgresql.org (Tom Lane)
Subject pgsql: GIN's ItemPointerIsMin, ItemPointerIsMax, and
Date
Msg-id 20090605185059.19ABD75331E@cvs.postgresql.org
Whole thread Raw
List pgsql-committers
Log Message:
-----------
GIN's ItemPointerIsMin, ItemPointerIsMax, and ItemPointerIsLossyPage macros
should use GinItemPointerGetBlockNumber/GinItemPointerGetOffsetNumber,
not ItemPointerGetBlockNumber/ItemPointerGetOffsetNumber, because the latter
will Assert() on ip_posid == 0, ie a "Min" pointer.  (Thus, ItemPointerIsMin
has never worked at all, but it seems unused at present.)  I'm not certain
that the case can occur in normal functioning, but it's blowing up on me
while investigating Tatsuo-san's data corruption problem.  In any case it
seems like a problem waiting to bite someone.

Back-patch just in case this really is a problem for somebody in the field.

Tags:
----
REL8_2_STABLE

Modified Files:
--------------
    pgsql/src/include/access:
        gin.h (r1.9.2.3 -> r1.9.2.4)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/access/gin.h?r1=1.9.2.3&r2=1.9.2.4)

pgsql-committers by date:

Previous
From: tgl@postgresql.org (Tom Lane)
Date:
Subject: pgsql: GIN's ItemPointerIsMin, ItemPointerIsMax, and
Next
From: bmomjian@pgfoundry.org (User Bmomjian)
Date:
Subject: pg-migrator - pg_migrator: Clarify cleanup information.