pgsql: Fix an additional set of problems in GIN's handling of lossy page

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix an additional set of problems in GIN's handling of lossy page
Date: 2010-08-01 19:16:47
Message-ID: 20100801191647.2791E7541D5@cvs.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Log Message:
-----------
Fix an additional set of problems in GIN's handling of lossy page pointers.
Although the key-combining code claimed to work correctly if its input
contained both lossy and exact pointers for a single page in a single TID
stream, in fact this did not work, and could not work without pretty
fundamental redesign. Modify keyGetItem so that it will not return such a
stream, by handling lossy-pointer cases a bit more explicitly than we did
before.

Per followup investigation of a gripe from Artur Dabrowski.
An example of a query that failed given his data set is
select count(*) from search_tab where
(to_tsvector('german', keywords ) @@ to_tsquery('german', 'ee:* | dd:*')) and
(to_tsvector('german', keywords ) @@ to_tsquery('german', 'aa:*'));

Back-patch to 8.4 where the lossy pointer code was introduced.

Tags:
----
REL9_0_STABLE

Modified Files:
--------------
pgsql/src/backend/access/gin:
ginget.c (r1.30.4.1 -> r1.30.4.2)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/gin/ginget.c?r1=1.30.4.1&r2=1.30.4.2)
pgsql/src/include/access:
gin.h (r1.38.4.2 -> r1.38.4.3)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/access/gin.h?r1=1.38.4.2&r2=1.38.4.3)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2010-08-01 19:16:55 pgsql: Fix an additional set of problems in GIN's handling of lossy page
Previous Message Tom Lane 2010-08-01 19:16:39 pgsql: Fix an additional set of problems in GIN's handling of lossy page