pgsql: Fix a serious bug introduced into GIN in 8.4: now that - Mailing list pgsql-committers

From tgl@postgresql.org (Tom Lane)
Subject pgsql: Fix a serious bug introduced into GIN in 8.4: now that
Date
Msg-id 20090606023940.BD4B875331E@cvs.postgresql.org
Whole thread Raw
List pgsql-committers
Log Message:
-----------
Fix a serious bug introduced into GIN in 8.4: now that MergeItemPointers()
is supposed to remove duplicate heap TIDs, we have to be sure to reduce the
tuple size and posting-item count accordingly in addItemPointersToTuple().
Failing to do so resulted in the effective injection of garbage TIDs into the
index contents, ie, whatever happened to be in the memory palloc'd for the
new tuple.  I'm not sure that this fully explains the index corruption
reported by Tatsuo Ishii, but the test case I'm using no longer fails.

Modified Files:
--------------
    pgsql/src/backend/access/gin:
        gindatapage.c (r1.14 -> r1.15)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/gin/gindatapage.c?r1=1.14&r2=1.15)
        ginentrypage.c (r1.19 -> r1.20)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/gin/ginentrypage.c?r1=1.19&r2=1.20)
        gininsert.c (r1.20 -> r1.21)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/gin/gininsert.c?r1=1.20&r2=1.21)
    pgsql/src/include/access:
        gin.h (r1.32 -> r1.33)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/access/gin.h?r1=1.32&r2=1.33)

pgsql-committers by date:

Previous
From: bmomjian@pgfoundry.org (User Bmomjian)
Date:
Subject: pg-migrator - pg_migrator: Wording improvement.
Next
From: tgl@postgresql.org (Tom Lane)
Date:
Subject: pgsql: Move variable declaration to avoid 'unused variable' warning when