Received: from maia.hub.org (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 44794632A30 for ; Thu, 8 Apr 2010 11:31:27 -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 84021-02 for ; Thu, 8 Apr 2010 14:31:06 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from rs47.luxsci.com (rs47.luxsci.com [65.61.166.88]) by mail.postgresql.org (Postfix) with ESMTP id 88556632A1A for ; Thu, 8 Apr 2010 11:31:15 -0300 (ADT) Received: from gnanam (ABTS-TN-Static-186.58.165.122.airtelbroadband.in [122.165.58.186] (may be forged)) (authenticated bits=0) by rs47.luxsci.com (8.13.1/8.13.7) with ESMTP id o38EV7Pe017902; Thu, 8 Apr 2010 09:31:09 -0500 Reply-To: From: "Gnanakumar" To: Subject: Autovacuum daemon functionality questions Date: Thu, 8 Apr 2010 20:01:05 +0530 Organization: Zoniac Software Private Limited Message-ID: <00c001cad728$22f92f20$68eb8d60$@com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: AcrXKB6PVYvYpQfWSgWGG+PuYd0CiA== Content-Language: en-us X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.51 tagged_above=-10 required=5 tests=AWL=-0.325, BAYES_40=-0.185 X-Spam-Level: X-Archive-Number: 201004/86 X-Sequence-Number: 34180 Hi, I'm using PostgreSQL 8.2. I want to configure autovacuum daemon process in our production server in an efficient way and take advantage of this daemon to perform vacuum and analyze more aggressively. I also read about autovacuum daemon at http://www.postgresql.org/docs/8.2/interactive/routine-vacuuming.html My questions are: 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? 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. 3. Is there a way to see autovacuum daemon log entries?