Обсуждение: pgsql: GIN's ItemPointerIsMin, ItemPointerIsMax, and

Поиск
Список
Период
Сортировка

pgsql: GIN's ItemPointerIsMin, ItemPointerIsMax, and

От
tgl@postgresql.org (Tom Lane)
Дата:
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)