Received: from maia.hub.org (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 1E6AA6333EA for ; Wed, 31 Mar 2010 05:59:03 -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 83529-04 for ; Wed, 31 Mar 2010 08:58:47 +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 6B24F633197 for ; Wed, 31 Mar 2010 05:58:52 -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 o2V8wjie014688; Wed, 31 Mar 2010 03:58:47 -0500 Reply-To: From: "Gnanakumar" To: "'Guillaume Lelarge'" Cc: References: <007501cad09d$326fefc0$974fcf40$@com> <4BB2FA68.6060708@lelarge.info> In-Reply-To: <4BB2FA68.6060708@lelarge.info> Subject: Re: Statistics Collector not collecting server activities Date: Wed, 31 Mar 2010 14:28:41 +0530 Organization: Zoniac Software Private Limited Message-ID: <00b601cad0b0$5e713760$1b53a620$@com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Office Outlook 12.0 thread-index: AcrQpDz+3Yd3FIPGRHi0uuCnkY1d3QADAnyg Content-Language: en-us X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.092 tagged_above=-10 required=5 tests=AWL=0.093, BAYES_40=-0.185 X-Spam-Level: X-Archive-Number: 201003/275 X-Sequence-Number: 34074 I=92m also seeing a weird thing. If I do =91show = stats_start_collector;=92 inside psql, it says =91off=92. I=92ve also restarted my server many times after making all the changes. As per 8.2 doc, http://www.postgresql.org/docs/8.2/interactive/runtime-config-statistics.= htm l, stats_start_collector is on by default. -----Original Message----- From: Guillaume Lelarge [mailto:guillaume@lelarge.info]=20 Sent: Wednesday, March 31, 2010 1:02 PM To: gnanam@zoniac.com Cc: pgsql-admin@postgresql.org Subject: Re: [ADMIN] Statistics Collector not collecting server = activities Le 31/03/2010 08:41, Gnanakumar a =E9crit : > Hi, >=20 > =20 >=20 > 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. >=20 > =20 >=20 > PostgreSQL version 8.2 >=20 > =20 >=20 > Parameters enabled related to this are: >=20 > # - Query/Index Statistics Collector - >=20 > =20 >=20 > #stats_command_string =3D on >=20 > #update_process_title =3D on >=20 > =20 >=20 > #stats_start_collector =3D on >=20 > =20 >=20 >=20 > #stats_block_level =3D off >=20 > #stats_row_level =3D off >=20 > stats_block_level =3D on >=20 > stats_row_level =3D on >=20 > #stats_reset_on_server_start =3D off=20 >=20 > =20 >=20 > # - Statistics Monitoring - >=20 > =20 >=20 > #log_parser_stats =3D off >=20 > #log_planner_stats =3D off >=20 > #log_executor_stats =3D off >=20 > #log_statement_stats =3D off >=20 > =20 >=20 > I'm always getting zero value for all the tables. >=20 > =20 >=20 > select pg_stat_get_tuples_inserted((select oid from pg_class where = relname =3D > 'mytable')); >=20 > select pg_stat_get_tuples_updated((select oid from pg_class where = relname =3D > 'mytable')); >=20 > select pg_stat_get_tuples_deleted((select oid from pg_class where = relname =3D > 'mytable')); >=20 >=20 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 =3D on" and restart once again PostgreSQL. --=20 Guillaume. http://www.postgresqlfr.org http://dalibo.com