Received: from localhost (unknown [200.46.204.183]) by developer.postgresql.org (Postfix) with ESMTP id 499DC2E0065 for ; Tue, 10 Jun 2008 08:23:25 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 15536-07 for ; Tue, 10 Jun 2008 08:23:18 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from hook.sigaev.ru (hook.sigaev.ru [212.192.243.50]) by developer.postgresql.org (Postfix) with ESMTP id 4AA882E0060 for ; Tue, 10 Jun 2008 08:23:22 -0300 (ADT) Received: by hook.sigaev.ru (Postfix, from userid 1003) id 2B81139906; Tue, 10 Jun 2008 15:23:19 +0400 (MSD) Received: from xor.sai.msu.ru (ppp83-237-62-67.pppoe.mtu-net.ru [83.237.62.67]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by hook.sigaev.ru (Postfix) with ESMTP id 93C2C398E2; Tue, 10 Jun 2008 15:23:14 +0400 (MSD) Message-ID: <484E641A.4060301@sigaev.ru> Date: Tue, 10 Jun 2008 15:23:06 +0400 From: Teodor Sigaev User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.8.1.13) Gecko/20080401 SeaMonkey/1.1.9 MIME-Version: 1.0 To: Alvaro Herrera CC: Heikki Linnakangas , Patches Subject: Re: GIN improvements References: <483FD205.4090904@sigaev.ru> <4849418C.6080909@sigaev.ru> <4849436F.30703@enterprisedb.com> <484946C6.1080807@sigaev.ru> <20080608222626.GB11028@alvh.no-ip.org> In-Reply-To: <20080608222626.GB11028@alvh.no-ip.org> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200806/66 X-Sequence-Number: 6552 > Perhaps we could make the fixed-size buffer be of size X, and trigger > autovac on X/3 or some such, to give it enough slack so that it would be > very unlikely to be processed by user processes. >> Do you mean that GIN sends a "smoke signal" to the autovacuum launcher >> process to ask about vacuum? > Currently, autovac only uses pgstats as trigger for actions. Maybe we > could use something else (say, a flag in shared memory?), or just stash > the info that the index needs to be processed in pgstats and have > autovac examine it. Flag in pgstats or shared memory is most reasonable solution. Using size of buffers is not very good because other indexes might use another technics for delayed insert and use another trigger criteria. Suppose, the best technic for GIN will be a setting flag by search procedure - if time of scanning pending pages is eqial to time of search in regular structure then it's time to call insert cleanup. -- Teodor Sigaev E-mail: teodor@sigaev.ru WWW: http://www.sigaev.ru/