Re: Statistics Collector not collecting server activities

Lists: pgsql-admin
From: "Gnanakumar" <gnanam(at)zoniac(dot)com>
To: <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Statistics Collector not collecting server activities
Date: 2010-03-31 07:27:35
Message-ID: 008b01cad0a3$a50782e0$ef1688a0$@com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-admin

I'm also seeing a weird thing. If I do 'show stats_start_collector;' inside
psql, it says 'off'.

I've 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.

From: Gnanakumar [mailto:gnanam(at)zoniac(dot)com]
Sent: Wednesday, March 31, 2010 12:11 PM
To: pgsql-admin(at)postgresql(dot)org
Subject: Statistics Collector not collecting server activities

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'));

Attachment Content-Type Size
winmail.dat application/ms-tnef 5.9 KB

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: gnanam(at)zoniac(dot)com
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Statistics Collector not collecting server activities
Date: 2010-03-31 21:42:46
Message-ID: 28454.1270071766@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-admin

"Gnanakumar" <gnanam(at)zoniac(dot)com> writes:
> I'm also seeing a weird thing. If I do 'show stats_start_collector;' inside
> psql, it says 'off'.

Yeah, this is the expected state if the collector fails to start for
some reason. Look into the postmaster log for a startup-time message
indicating why; but again, I'll bet on problems creating its UDP socket.

regards, tom lane


From: "Gnanakumar" <gnanam(at)zoniac(dot)com>
To: "'Tom Lane'" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Statistics Collector not collecting server activities
Date: 2010-04-09 13:33:28
Message-ID: 004801cad7e9$414f7a80$c3ee6f80$@com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-admin

Hi Tom,

As you said, I notice the following in postmaster log:
2010-04-08 17:30:41 ISTLOG: could not receive test message on socket for
statistics collector: Connection refused
2010-04-08 17:30:41 ISTLOG: disabling statistics collector for lack of
working socket

What is going wrong? I couldn't understand from the above lines.

If postgresql service can start without any issues, why not stats collector
process the same way?

-----Original Message-----
From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
Sent: Thursday, April 01, 2010 3:13 AM
To: gnanam(at)zoniac(dot)com
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: [ADMIN] Statistics Collector not collecting server activities

"Gnanakumar" <gnanam(at)zoniac(dot)com> writes:
> I'm also seeing a weird thing. If I do 'show stats_start_collector;'
inside
> psql, it says 'off'.

Yeah, this is the expected state if the collector fails to start for
some reason. Look into the postmaster log for a startup-time message
indicating why; but again, I'll bet on problems creating its UDP socket.

regards, tom lane


From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "'Tom Lane'" <tgl(at)sss(dot)pgh(dot)pa(dot)us>,<gnanam(at)zoniac(dot)com>
Cc: <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Statistics Collector not collecting server activities
Date: 2010-04-09 14:06:01
Message-ID: 4BBEEDF90200002500030638@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-admin

"Gnanakumar" <gnanam(at)zoniac(dot)com> wrote:

> As you said, I notice the following in postmaster log:
> 2010-04-08 17:30:41 ISTLOG: could not receive test message on
> socket for statistics collector: Connection refused
> 2010-04-08 17:30:41 ISTLOG: disabling statistics collector for
> lack of working socket
>
> What is going wrong? I couldn't understand from the above lines.

Is an OS firewall or anti-virus program running on this machine?
Any other unusual security features, like SE-Linux?

-Kevin


From: "Gnanakumar" <gnanam(at)zoniac(dot)com>
To: "'Kevin Grittner'" <Kevin(dot)Grittner(at)wicourts(dot)gov>, "'Tom Lane'" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Statistics Collector not collecting server activities
Date: 2010-04-10 06:24:56
Message-ID: 000a01cad876$8c4bd140$a4e373c0$@com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-admin

Hi Kevin,

No, it is not SE-Linux and no anti-virus programs are running. I can again
cross-check whether any firewall is enabled.

But again if postgresql service can start without any issues, why not stats
collector process the same way?

Does stats collector process need any other special
resource/privilege/operations/port to start? Can you let me know in this
aspect, so that it would be helpful to troubleshoot better.

-----Original Message-----
From: Kevin Grittner [mailto:Kevin(dot)Grittner(at)wicourts(dot)gov]
Sent: Friday, April 09, 2010 7:36 PM
To: 'Tom Lane'; gnanam(at)zoniac(dot)com
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: [ADMIN] Statistics Collector not collecting server activities

"Gnanakumar" <gnanam(at)zoniac(dot)com> wrote:

> As you said, I notice the following in postmaster log:
> 2010-04-08 17:30:41 ISTLOG: could not receive test message on
> socket for statistics collector: Connection refused
> 2010-04-08 17:30:41 ISTLOG: disabling statistics collector for
> lack of working socket
>
> What is going wrong? I couldn't understand from the above lines.

Is an OS firewall or anti-virus program running on this machine?
Any other unusual security features, like SE-Linux?

-Kevin