Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id A0065632FBD for ; Mon, 9 Feb 2009 13:45:22 -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 19736-04-7 for ; Mon, 9 Feb 2009 13:44:58 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from a.mail.sonomait.com (a.mail.sonomait.com [64.142.123.30]) by mail.postgresql.org (Postfix) with ESMTP id E037F632D53 for ; Mon, 9 Feb 2009 13:44:04 -0400 (AST) Received: from localhost (localhost.localdomain [127.0.0.1]) by a.mail.sonomait.com (Postfix) with ESMTP id 038B41644A2 for ; Mon, 9 Feb 2009 09:43:53 -0800 (PST) X-Virus-Scanned: amavisd-new at Received: from a.mail.sonomait.com ([127.0.0.1]) by localhost (a.mail.sonomait.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id WLnwid9V0kew for ; Mon, 9 Feb 2009 09:43:51 -0800 (PST) Received: from [172.18.30.70] (89-96-142-243.ip12.fastwebnet.it [89.96.142.243]) by a.mail.sonomait.com (Postfix) with ESMTP id 1C8731644F8 for ; Mon, 9 Feb 2009 09:43:50 -0800 (PST) Message-ID: <49906B4F.5040509@gmail.com> Date: Mon, 09 Feb 2009 18:43:43 +0100 From: Stefano Nichele User-Agent: Thunderbird 2.0.0.19 (Windows/20081209) MIME-Version: 1.0 To: pgsql-admin@postgresql.org Subject: strange autovacuum behaviour Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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/61 X-Sequence-Number: 31282 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 ? Other question. Yesterday I noticed another strange thing. autovacuum was off since the aforementioned issue and a vacuum scheduled at 06:00 UTC. Checking pg_stat_all_tables (last_autovacuum field) I saw that at 05:30 UTC an autovacuum was performed for almost all the tables. After 30 min (at 06:00) vacuum started and for about 2 hours, vacuum and autovacuum were running simultaneously. Why autovacuum (that was OFF) started ? For preventing transaction ID wraparound ? Is it right that in such case all the tables are (auto)vacuumed ? My database is about 35 GB and the most updated table (in terms of insert/delete/update) is indeed the biggest one (3.6 GB of data, 3.2 GB primary key index, 1.5 GB another index) and I'm using postgres 8.2.9. Thanks in advance for any suggestion. Cheers, ste