Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 5886C632403 for ; Tue, 20 Jan 2009 14:02:05 -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 12505-02 for ; Tue, 20 Jan 2009 14:02:01 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from wf-out-1314.google.com (wf-out-1314.google.com [209.85.200.171]) by mail.postgresql.org (Postfix) with ESMTP id 279E363237A for ; Tue, 20 Jan 2009 14:02:00 -0400 (AST) Received: by wf-out-1314.google.com with SMTP id 25so3673114wfc.28 for ; Tue, 20 Jan 2009 10:01:59 -0800 (PST) Received: by 10.142.231.7 with SMTP id d7mr1296415wfh.181.1232474519037; Tue, 20 Jan 2009 10:01:59 -0800 (PST) Received: from ?192.168.1.10? (c-67-188-158-142.hsd1.ca.comcast.net [67.188.158.142]) by mx.google.com with ESMTPS id 31sm7254535wff.3.2009.01.20.10.01.56 (version=SSLv3 cipher=RC4-MD5); Tue, 20 Jan 2009 10:01:56 -0800 (PST) Subject: Re: [PATCHES] GIN improvements From: Jeff Davis To: Teodor Sigaev Cc: Heikki Linnakangas , Tom Lane , Pgsql Hackers In-Reply-To: <4974B002.3040202@sigaev.ru> 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> <4942A137.3000502@sigaev.ru> <1229910966.2285.76.camel@jdavis> <49708008.8070109@sigaev.ru> <1232348905.7281.114.camel@jdavis> <4974B002.3040202@sigaev.ru> Content-Type: text/plain Date: Tue, 20 Jan 2009 10:01:29 -0800 Message-Id: <1232474489.23316.8.camel@jdavis> Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=2.125 tagged_above=0 required=5 tests=DNS_FROM_RFC_BOGUSMX=2.125 X-Spam-Level: ** X-Archive-Number: 200901/1463 X-Sequence-Number: 132107 On Mon, 2009-01-19 at 19:53 +0300, Teodor Sigaev wrote: > I see only two guaranteed solution of the problem: > - after limit is reached, force normal index inserts. One of the motivation of > patch was frequent question from users: why update of whole table with GIN index > is so slow? So this way will not resolve this question. > - after limit is reached, force cleanup of pending list by calling > gininsertcleanup. Not very good, because users sometimes will see a huge > execution time of simple insert. Although users who runs a huge update should be > satisfied. > > I have difficulties in a choice of way. Seems to me, the better will be second > way: if user gets very long time of insertion then (auto)vacuum of his > installation should tweaked. > I agree that the second solution sounds better to me. With the new Visibility Map, it's more reasonable to run VACUUM more often, so those that are inserting single tuples at a time should not encounter the long insert time. I'm still looking at the rest of the patch. Regards, Jeff Davis