Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id 05A8C9FB334 for ; Wed, 27 Sep 2006 13:53:41 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 57511-10 for ; Wed, 27 Sep 2006 16:53:37 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from lynet.oppetid.no (oppetid.no [80.65.51.2]) by postgresql.org (Postfix) with ESMTP id C6CEB9FB2DF for ; Wed, 27 Sep 2006 13:53:36 -0300 (ADT) Received: by lynet.oppetid.no (Postfix, from userid 1019) id 08D6A11AFB5; Wed, 27 Sep 2006 18:53:36 +0200 (CEST) Date: Wed, 27 Sep 2006 18:53:36 +0200 From: Tobias Brox To: Edoardo Ceccarelli Cc: pgsql-performance@postgresql.org Subject: Re: autovacuum on a -mostly- r/o table Message-ID: <20060927165336.GA11191@oppetid.no> References: <451AA1FE.9050704@axa.it> <1159374712.46586.47.camel@home> <451AAB93.6010602@axa.it> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <451AAB93.6010602@axa.it> Organization: Group Nordicbet User-Agent: Mutt/1.5.9i X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.135 tagged_above=0 required=5 tests=FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200609/365 X-Sequence-Number: 21051 [Edoardo Ceccarelli - Wed at 06:49:23PM +0200] > ...another thing is, how could autovacuum check for machine load, this > is something I cannot imagine right now... One solution I made for our application, is to check the pg_stats_activity view. It requires some config to get the stats available in that view, though. When the application is to start a low-priority transaction, it will first do: select count(*) from pg_stat_activity where current_query not like '