Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id B0CFE6331D6 for ; Tue, 24 Feb 2009 15:06: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 70011-02 for ; Tue, 24 Feb 2009 15:05:54 -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 985E96342CD for ; Tue, 24 Feb 2009 15:05:54 -0400 (AST) Received: from localhost (localhost.localdomain [127.0.0.1]) by a.mail.sonomait.com (Postfix) with ESMTP id 43DB31649B0; Tue, 24 Feb 2009 11:05:51 -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 FEs9RaxG8rdR; Tue, 24 Feb 2009 11:05:49 -0800 (PST) Received: from [192.168.1.33] (ppp-148-198.20-151.libero.it [151.20.198.148]) by a.mail.sonomait.com (Postfix) with ESMTP id E444216483E; Tue, 24 Feb 2009 11:05:48 -0800 (PST) Message-ID: <49A44509.6090600@gmail.com> Date: Tue, 24 Feb 2009 20:05:45 +0100 From: Stefano Nichele User-Agent: Thunderbird 2.0.0.19 (Windows/20081209) MIME-Version: 1.0 To: Alvaro Herrera CC: pgsql-admin@postgresql.org Subject: Re: strange autovacuum behaviour References: <49906B4F.5040509@gmail.com> <20090210140742.GG3708@alvh.no-ip.org> In-Reply-To: <20090210140742.GG3708@alvh.no-ip.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit 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/205 X-Sequence-Number: 31426 Hi Alvaro, thanks for your answer and sorry for the delay but I was in vacation. Alvaro Herrera wrote: > 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. > Currently I'm still run vacuum but as soon as I can, I'll do other tests. > >> 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). > > Actually I saw that it autovacuumed all tables (except 2 of 100 tables). And why during vacuum ? (this is not just a coincidence since occurred more than one time). It seems autovacuum was triggered by vacuum. Cheers, ste