GIN's ItemPointerIsMin, ItemPointerIsMax, and ItemPointerIsLossyPage macros

Tom Lane <tgl@sss.pgh.pa.us>

Commit: f5f3d1440a6f152859d601ee3c9230835d0dcc4f
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2009-06-05T18:50:59Z
Releases: 8.2.14
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.

Files

PathChange+/−
src/include/access/gin.h modified +3 −3