Received: from maia.hub.org (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id A2AC0632A1A for ; Thu, 8 Apr 2010 11:53:43 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 25663-05 for ; Thu, 8 Apr 2010 14:53:23 +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 ED4A7632982 for ; Thu, 8 Apr 2010 11:53:32 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by spinlock.commandprompt.com (Postfix) with ESMTP id 01A5534803F; Thu, 8 Apr 2010 07:53:31 -0700 (PDT) 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 XlvFPAZVK23b; Thu, 8 Apr 2010 07:53:30 -0700 (PDT) Received: from perhan.alvh.no-ip.org (unknown [190.95.8.27]) by spinlock.commandprompt.com (Postfix) with ESMTPSA id 9A830348034; Thu, 8 Apr 2010 07:53:30 -0700 (PDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 6AE4D6E4A9; Thu, 8 Apr 2010 10:53:28 -0400 (CLT) Date: Thu, 8 Apr 2010 10:53:28 -0400 From: Alvaro Herrera To: Gnanakumar Cc: pgsql-admin@postgresql.org Subject: Re: Autovacuum daemon functionality questions Message-ID: <20100408145328.GB4126@alvh.no-ip.org> References: <00c001cad728$22f92f20$68eb8d60$@com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <00c001cad728$22f92f20$68eb8d60$@com> User-Agent: Mutt/1.5.20 (2009-06-14) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.551 tagged_above=-10 required=5 tests=AWL=0.048, BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 201004/87 X-Sequence-Number: 34181 Gnanakumar wrote: > 1. Why need to have 2 parameters (base threshold and scale factor) to define > the threshold value, when either one of the parameter is more than enough to > define the threshold value. Can you explain the significance of having both > parameters. What is the real-time advantage of this? real-time advantage? They are just the two factors in a linear equation. > 2. Documentation says ".... If the number of obsolete tuples since the last > VACUUM exceeds the "vacuum threshold", the table is vacuumed ...". > I also know about this table "pg_stat_user_tables" which has columns > n_tup_ins, n_tup_upd, n_tup_del, last_autovaccum and last_autoanalyze. > Since INSERT, UPDATE and DELETE count gets incremented everytime and do not > reset after running autovacuum/autoanalyze, how does autovacuum identifies > obsolete tuples since last VACUUM from this entries. There are two separate counters for live and dead tuples, IIRC (though they may not be exposed in the pg_stat views) > 3. Is there a way to see autovacuum daemon log entries? Not in 8.2. -- Alvaro Herrera http://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support