GIN's ItemPointerIsMin, ItemPointerIsMax, and ItemPointerIsLossyPage macros
authorTom Lane <[email protected]>
Fri, 5 Jun 2009 18:50:47 +0000 (18:50 +0000)
committerTom Lane <[email protected]>
Fri, 5 Jun 2009 18:50:47 +0000 (18:50 +0000)
commit0e21a7d74ba4f519fe27842ad14c002580faa0d9
tree71bcabe3ab3a4eebf5a13cd8cd53b63b7d024244
parent1735676910cdfda9078676426f937949c010f432
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.
src/include/access/gin.h