Re: Fixing GIN for empty/null/full-scan cases

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Fixing GIN for empty/null/full-scan cases
Date: 2011-01-04 23:18:46
Message-ID: 4D23AAD6.8020700@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 1/4/11 1:49 PM, Tom Lane wrote:
> I don't think it's really worth the trouble. The GIN code has been
> broken for these types of queries since day one, and yet we've had only
> maybe half a dozen complaints about it. Moreover there's no practical
> way to "avoid trying to use the index", since in many cases the fact
> that a query requires a full-index scan isn't determinable at plan time.

Actually, there's been a *lot* of complaining about the GIN issues.
It's just that most of that complaining doesn't reach -hackers.

The common pattern I've seen in our practice and on IRC is:

1) user has GiST indexes
2) user tries converting them to GIN
3) user gets "full index scan" errors
4) user switches back and gives up

I agree that backwards compatibility should not be a priority; it is
sufficient to tell users to reindex. For one thing, anyone who *is*
using GIN presently will have written their application code to avoid
full index scans.

--
-- Josh Berkus
PostgreSQL Experts Inc.
http://www.pgexperts.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2011-01-04 23:18:57 Re: Fixing GIN for empty/null/full-scan cases
Previous Message Martijn van Oosterhout 2011-01-04 22:52:54 Re: can shared cache be swapped to disk?