Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 9E4901337B79 for ; Tue, 4 Jan 2011 19:19:10 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 47914-02 for ; Tue, 4 Jan 2011 23:19:03 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from outmail149088.authsmtp.co.uk (outmail149088.authsmtp.co.uk [62.13.149.88]) by mail.postgresql.org (Postfix) with ESMTP id 25DD41337B69 for ; Tue, 4 Jan 2011 19:19:02 -0400 (AST) Received: from mail-c193.authsmtp.com (mail-c193.authsmtp.com [62.13.128.118]) by punt4.authsmtp.com (8.14.2/8.14.2/Kp) with ESMTP id p04NJ2HW088396 for ; Tue, 4 Jan 2011 23:19:02 GMT Received: from Sidney-Stratton.local (dsl081-245-111.sfo1.dsl.speakeasy.net [64.81.245.111]) (authenticated bits=0) by mail.authsmtp.com (8.14.2/8.14.2) with ESMTP id p04NIq3A065795 for ; Tue, 4 Jan 2011 23:18:53 GMT Message-ID: <4D23AAD6.8020700@agliodbs.com> Date: Tue, 04 Jan 2011 15:18:46 -0800 From: Josh Berkus User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1b3pre) Gecko/20090223 Thunderbird/3.0b2 MIME-Version: 1.0 To: pgsql-hackers@postgresql.org Subject: Re: Fixing GIN for empty/null/full-scan cases References: <15190.1294175357@sss.pgh.pa.us> <15816.1294177767@sss.pgh.pa.us> In-Reply-To: <15816.1294177767@sss.pgh.pa.us> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Server-Quench: ff1d33c5-1858-11e0-97bb-002264978518 X-AuthReport-Spam: If SPAM / abuse - report it at: http://www.authsmtp.com/abuse X-AuthRoute: OCdyZgscClZXSx8a IioLCC5HRQ8+YBZL BAkbIhBDJB8JXA9S P1xBBkJUK0ETX1xC QjoVBBYDHl11Rhkk NRVTbQRcckhNVQRi Wk1KDFRWCg1pHx4F AwAfUxhtdQBEfWFw KwZiWg4iHUcLdUB4 RUdRW2wBYWQuPjYe BENbJAZJcQtPdgJE awV/SXoKMzcaZnpi RVFvbm9hYGwPPh5Y EEk+DXs5YmsxJQt0 aRESHDMgVWIkYW09 KAZuJ1sEAFdWNFg2 NRwvRFYcdgQZAwsW FEhWDTQx X-Authentic-SMTP: 61633136333939.1014:706 X-AuthFastPath: 255 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-5 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201101/291 X-Sequence-Number: 178128 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