Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 67484633030 for ; Tue, 10 Feb 2009 10:19:01 -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 26984-03-2 for ; Tue, 10 Feb 2009 10:18:56 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from lists.commandprompt.com (host-159.commandprompt.net [207.173.203.159]) by mail.postgresql.org (Postfix) with ESMTP id 581C1633031 for ; Tue, 10 Feb 2009 10:18:54 -0400 (AST) Received: from alvh.no-ip.org ([164.77.102.134]) (authenticated bits=0) by lists.commandprompt.com (8.13.8/8.13.8) with ESMTP id n1AEOvUa030970 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 10 Feb 2009 06:25:00 -0800 Received: by alvh.no-ip.org (Postfix, from userid 1000) id 5C5AB560009; Tue, 10 Feb 2009 11:07:42 -0300 (CLST) Date: Tue, 10 Feb 2009 11:07:42 -0300 From: Alvaro Herrera To: Stefano Nichele Cc: pgsql-admin@postgresql.org Subject: Re: strange autovacuum behaviour Message-ID: <20090210140742.GG3708@alvh.no-ip.org> References: <49906B4F.5040509@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <49906B4F.5040509@gmail.com> User-Agent: Mutt/1.5.18 (2008-05-17) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0 (lists.commandprompt.com [207.173.203.159]); Tue, 10 Feb 2009 06:25:01 -0800 (PST) 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: 200902/70 X-Sequence-Number: 31291 Stefano Nichele escribió: > Hi All, > I have a couple of questions about autovacuum/vacuum behavior. > > On my production system, I set autovacuum ON since it's pretty hard to > me find a good timeframe for vacuum (the system is pretty busy over the day) > Last week the system was really slow and running vacuum manually the > performance was really improved. > So now I would like to understand why autovacuum did not work as > expected (at least for me). Any ideas ? Maybe the autovacuum naptime was set too high. Or perhaps the threshold and scale settings were too high. Maybe the vacuum_cost_delay for autovacuum was too high. > Why autovacuum (that was OFF) started ? For preventing transaction ID > wraparound ? Is it right that in such case all the tables are > (auto)vacuumed ? Not necessarily all tables; only those that require a vacuum to prevent xid wraparound. (It was all tables in 8.1, but this changed in 8.2).