Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 8FA786328F0 for ; Wed, 31 Mar 2010 04:32:05 -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 87413-10 for ; Wed, 31 Mar 2010 07:31:55 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sd-17937.dedibox.fr (sd-17937.dedibox.fr [88.191.100.74]) by mail.postgresql.org (Postfix) with ESMTP id 1661F6325EC for ; Wed, 31 Mar 2010 04:31:55 -0300 (ADT) Received: from [192.168.0.7] (uni14-1-82-233-223-216.fbx.proxad.net [82.233.223.216]) by sd-17937.dedibox.fr (Postfix) with ESMTPA id 645873B8F5; Wed, 31 Mar 2010 09:31:53 +0200 (CEST) Message-ID: <4BB2FA68.6060708@lelarge.info> Date: Wed, 31 Mar 2010 09:31:52 +0200 From: Guillaume Lelarge User-Agent: Mozilla/5.0 (X11; U; Linux i686; fr; rv:1.9.1.8) Gecko/20100227 Thunderbird/3.0.3 MIME-Version: 1.0 To: gnanam@zoniac.com CC: pgsql-admin@postgresql.org Subject: Re: Statistics Collector not collecting server activities References: <007501cad09d$326fefc0$974fcf40$@com> In-Reply-To: <007501cad09d$326fefc0$974fcf40$@com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.599 tagged_above=-10 required=5 tests=BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 201003/268 X-Sequence-Number: 34067 Le 31/03/2010 08:41, Gnanakumar a écrit : > Hi, > > > > Even though I've enabled statistics collector in our server, it is not > collecting statistics, and because of this autovacuum is also not running as > expected. > > > > PostgreSQL version 8.2 > > > > Parameters enabled related to this are: > > # - Query/Index Statistics Collector - > > > > #stats_command_string = on > > #update_process_title = on > > > > #stats_start_collector = on > > > > > #stats_block_level = off > > #stats_row_level = off > > stats_block_level = on > > stats_row_level = on > > #stats_reset_on_server_start = off > > > > # - Statistics Monitoring - > > > > #log_parser_stats = off > > #log_planner_stats = off > > #log_executor_stats = off > > #log_statement_stats = off > > > > I'm always getting zero value for all the tables. > > > > select pg_stat_get_tuples_inserted((select oid from pg_class where relname = > 'mytable')); > > select pg_stat_get_tuples_updated((select oid from pg_class where relname = > 'mytable')); > > select pg_stat_get_tuples_deleted((select oid from pg_class where relname = > 'mytable')); > > If the stats collector was disabled before, did you restart PostgreSQL? if you did restart, you should drop the # in front of "stats_start_collector = on" and restart once again PostgreSQL. -- Guillaume. http://www.postgresqlfr.org http://dalibo.com