pgsql: GIN's ItemPointerIsMin, ItemPointerIsMax, and

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: GIN's ItemPointerIsMin, ItemPointerIsMax, and
Date: 2009-06-05 18:50:53
Message-ID: 20090605185053.060D075331E@cvs.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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_3_STABLE

Modified Files:
--------------
pgsql/src/include/access:
gin.h (r1.16.2.2 -> r1.16.2.3)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/access/gin.h?r1=1.16.2.2&r2=1.16.2.3)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2009-06-05 18:50:59 pgsql: GIN's ItemPointerIsMin, ItemPointerIsMax, and
Previous Message Tom Lane 2009-06-05 18:50:47 pgsql: GIN's ItemPointerIsMin, ItemPointerIsMax, and