Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 9302D632712 for ; Wed, 11 Aug 2010 12:17:42 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 96399-09 for ; Wed, 11 Aug 2010 15:17:35 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from spinlock.commandprompt.com (host-215.commandprompt.net [207.173.203.215]) by mail.postgresql.org (Postfix) with ESMTP id 6A71C632B4E for ; Wed, 11 Aug 2010 12:17:35 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by spinlock.commandprompt.com (Postfix) with ESMTP id C0D09348040; Wed, 11 Aug 2010 08:17:33 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at commandprompt.com Received: from spinlock.commandprompt.com ([127.0.0.1]) by localhost (spinlock.commandprompt.com.commandprompt.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id brx2qm1mZjGd; Wed, 11 Aug 2010 08:17:31 -0700 (PDT) Received: from perhan.alvh.no-ip.org (190-95-29-207.bk17-dsl.surnet.cl [190.95.29.207]) by spinlock.commandprompt.com (Postfix) with ESMTPSA id 62B7634803D; Wed, 11 Aug 2010 08:17:31 -0700 (PDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id BD1996E619; Wed, 11 Aug 2010 11:17:28 -0400 (CLT) Content-Type: text/plain; charset=UTF-8 Cc: pgsql-admin Subject: Re: Autovacuum daemon internal handling From: Alvaro Herrera To: Gnanakumar In-reply-to: <001d01cb3913$0e5c8f60$2b15ae20$@com> References: <001d01cb3913$0e5c8f60$2b15ae20$@com> Date: Wed, 11 Aug 2010 11:17:28 -0400 Message-Id: <1281539491-sup-7017@alvh.no-ip.org> User-Agent: Sup/git Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201008/87 X-Sequence-Number: 35336 Excerpts from Gnanakumar's message of mié ago 11 01:07:08 -0400 2010: Hi, > 1. Does autovacuum daemon works with one table at a time or does it work > with multiple tables at the same time? Only one. > Reason to ask this question is, let's say I've "autovacuum_naptime" set to 1 > minute, and there are 500 tables in one database. Assuming there are 10 > tables that has to be vacuumed and analyzed based on the threshold defined > in one of the autovacuum daemon execution time, and if takes more than 1 > minute to complete vacuum and analyze operation on even a single table (out > of 10 tables), how does autovacuum daemon works/handles in this case? in 8.2 "naptime" means "time to sleep after we finish a job". So even if the previous task takes an hour, it will still sleep a minute before doing another round. (Note that this setting has a different meaning in later releases). If autovacuum cannot keep up with all the vacuumable tables, you're in trouble and should probably schedule vacuum externally. (This also changed in later releases). > 2. The columns "last_autovaccum" and 'last_autoanalyze" in > pg_stat_user_tables shows the start time or end time of the operation? End time. -- Álvaro Herrera The PostgreSQL Company - Command Prompt, Inc. PostgreSQL Replication, Consulting, Custom Development, 24x7 support