Обсуждение: pgsql: Fix a serious bug introduced into GIN in 8.4: now that
pgsql: Fix a serious bug introduced into GIN in 8.4: now that
От
tgl@postgresql.org (Tom Lane)
Дата:
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)