pgsql: Fix a serious bug introduced into GIN in 8.4: now that

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix a serious bug introduced into GIN in 8.4: now that
Date: 2009-06-06 02:39:40
Message-ID: 20090606023940.BD4B875331E@cvs.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2009-06-06 03:45:36 pgsql: Move variable declaration to avoid 'unused variable' warning when
Previous Message User Bmomjian 2009-06-06 02:10:57 pg-migrator - pg_migrator: Wording improvement.