Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 6F2DF6503EF for ; Wed, 3 Dec 2008 12:40:37 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 39815-02-6 for ; Wed, 3 Dec 2008 12:40:31 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from ey-out-2122.google.com (ey-out-2122.google.com [74.125.78.24]) by mail.postgresql.org (Postfix) with ESMTP id 4F5FF65034D for ; Wed, 3 Dec 2008 12:40:23 -0400 (AST) Received: by ey-out-2122.google.com with SMTP id 6so1623685eyi.61 for ; Wed, 03 Dec 2008 08:40:21 -0800 (PST) Received: by 10.210.78.7 with SMTP id a7mr15574631ebb.156.1228322421248; Wed, 03 Dec 2008 08:40:21 -0800 (PST) Received: from ?80.223.223.193? (dsl-hkibrasgw2-fedfdf00-193.dhcp.inet.fi [80.223.223.193]) by mx.google.com with ESMTPS id 34sm1364272nfu.24.2008.12.03.08.40.19 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 03 Dec 2008 08:40:20 -0800 (PST) Message-ID: <4936B671.8070708@enterprisedb.com> Date: Wed, 03 Dec 2008 18:40:17 +0200 Organization: EnterpriseDB User-Agent: Mozilla-Thunderbird 2.0.0.17 (X11/20081018) MIME-Version: 1.0 To: Tom Lane CC: Greg Stark , Teodor Sigaev , Pgsql Hackers Subject: Re: [PATCHES] GIN improvements References: <483FD205.4090904@sigaev.ru> <486BC501.6060605@sigaev.ru> <27880.1215810535@sss.pgh.pa.us> <487A6E0C.3090600@sigaev.ru> <8993.1216843701@sss.pgh.pa.us> <4888A594.6010102@sigaev.ru> <490B07BA.6030109@sigaev.ru> <492F04D9.5070404@enterprisedb.com> <49353081.9030304@sigaev.ru> <493541F5.2020401@enterprisedb.com> <26721.1228266365@sss.pgh.pa.us> <49362DF0.80404@enterprisedb.com> <683CE0EA-799C-4644-9C9F-74AECD2BFBDC@enterprisedb.com> <7855.1228314933@sss.pgh.pa.us> In-Reply-To: <7855.1228314933@sss.pgh.pa.us> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit From: Heikki Linnakangas X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200812/159 X-Sequence-Number: 128788 Tom Lane wrote: > Greg Stark writes: >> If we do this though it would be really nice to do it at a higher >> level than the indexam. If we could do it for any indexam that >> provides a kind of bulk insert method that would be great. > >> I'm just not sure how to support all the indexable operators for the >> various indexams on the local buffered list. > > In principle, just return all those TIDs marked "lossy, please recheck". > This is a bit brute-force but I'm not sure any useful optimization is > possible. You could flush the local buffer to the index whenever the index is queried. Not sure if it's better than returning them for recheck, though. This wouldn't work for unique indexes, BTW, but that's not a problem for GIN. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com