From: | Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> |
---|---|
To: | Teodor Sigaev <teodor(at)sigaev(dot)ru>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | GIN, partial matches, lossy bitmaps |
Date: | 2009-03-02 19:14:23 |
Message-ID: | 49AC300F.1050903@enterprisedb.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
While reading the GIN code, I just rediscovered that the GIN partial
match support suffers from the same problem that I criticized the "fast
insert" patch about, and searching the archives I found that I already
complained about that back in April:
http://archives.postgresql.org/pgsql-patches/2008-04/msg00157.php
If I'm reading the code correctly, item pointers of all matching heap
tuples are first collected into a TIDBitmap, and then amgetnext returns
tuples from that one by one. If the bitmap becomes lossy, an error is
thrown. gingetbitmap is a dummy implementation: it creates a new
TIDBitmap and inserts all the tuples from the other TIDBitmap into it
one by one, and then returns the new TIDBitmap.
If we remove the support for regular, non-bitmap, index scans with GIN,
that could be cleaned up as well. Even if we don't do that, gingetbitmap
should not error when the bitmap becomes lossy, but just return the
lossy bitmap.
--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Teodor Sigaev | 2009-03-02 19:17:31 | Re: regression test crashes at tsearch |
Previous Message | Pavel Stehule | 2009-03-02 18:54:15 | Re: proposal: psql - breaking rows in white chars for wrapped format |