pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: tgl@postgresql.org
To: pgsql-committers@postgresql.org
Subject: pgsql: Fix a serious bug introduced into GIN in 8.4: now that
Date: Sat,  6 Jun 2009 02:39:40 +0000 (UTC)
Message-ID: <20090606023940.BD4B875331E@cvs.postgresql.org> (raw)

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...)
        ginentrypage.c (r1.19 -> r1.20)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/gin/ginentrypage.c?r1=1.19&r2=...)
        gininsert.c (r1.20 -> r1.21)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/gin/gininsert.c?r1=1.20&r2=1.2...)
    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)




view thread (2+ messages)  latest in thread

Message-ID: <20090606023940.BD4B875331E@cvs.postgresql.org>
Permalink:  ../20090606023940.BD4B875331E@cvs.postgresql.org/
Also on:    postgresql.org/message-id/20090606023940.BD4B875331E@cvs.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: tgl@postgresql.org
  Subject: Re: pgsql: Fix a serious bug introduced into GIN in 8.4: now that
  In-Reply-To: <20090606023940.BD4B875331E@cvs.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox