Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 8CE45632392 for ; Fri, 9 Apr 2010 12:02:54 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 55703-01 for ; Fri, 9 Apr 2010 15:02:44 +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 1E50D632333 for ; Fri, 9 Apr 2010 12:02:43 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by spinlock.commandprompt.com (Postfix) with ESMTP id 37854348037; Fri, 9 Apr 2010 08:02:43 -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 XBNOXnQAotx3; Fri, 9 Apr 2010 08:02:43 -0700 (PDT) Received: from perhan.alvh.no-ip.org (unknown [190.95.8.27]) by spinlock.commandprompt.com (Postfix) with ESMTPSA id C641F348034; Fri, 9 Apr 2010 08:02:42 -0700 (PDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 9DDCA6E4A9; Fri, 9 Apr 2010 11:02:40 -0400 (CLT) Date: Fri, 9 Apr 2010 11:02:40 -0400 From: Alvaro Herrera To: Gnanakumar Cc: pgsql-admin@postgresql.org Subject: Re: Autovacuum daemon functionality questions Message-ID: <20100409150240.GB4384@alvh.no-ip.org> References: <00c001cad728$22f92f20$68eb8d60$@com> <20100408145328.GB4126@alvh.no-ip.org> <001701cad7b7$7f1e2730$7d5a7590$@com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <001701cad7b7$7f1e2730$7d5a7590$@com> User-Agent: Mutt/1.5.20 (2009-06-14) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=-10 required=5 tests=none X-Spam-Level: X-Archive-Number: 201004/116 X-Sequence-Number: 34210 Gnanakumar wrote: > >There are two separate counters for live and dead tuples, IIRC (though > >they may not be exposed in the pg_stat views) > > I've a stop/start of PostgreSQL service on a daily basis. Since these 2 > counters are not stored/saved in tables and not available in pg_stat views > also, will these values be persisted/retained even after stop/start/restart? Yes, they persist. > >There are two separate counters for live and dead tuples > As per documentation, live tuples can always be obtained from > pg_class.reltuples. So, the question/answer here again would be to have > only counter on dead tuples since last VACUUM. Is my understanding right? > Is there some other/alternative way where I can check obsolete tuples at any > time since last VACUUM? reltuples is only updated by VACUUM and ANALYZE, which is why pgstats keeps track of numbers of tuples inserted/deleted/updated for a more accurate dead and live tuple counts, for autovacuum purposes. > >> 3. Is there a way to see autovacuum daemon log entries? > > >Not in 8.2. > > From which next version of PostgreSQL is it available? Any pointers to > relevant documentation are appreciated. 8.3 http://www.postgresql.org/docs/8.3/static/runtime-config-autovacuum.html -- Alvaro Herrera http://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc.