pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Statistics Collector not collecting server activities
18+ messages / 4 participants
[nested] [flat]

* Statistics Collector not collecting server activities
@ 2010-03-31 06:41 Gnanakumar <gnanam@zoniac.com>
  2010-03-31 07:31 ` Re: Statistics Collector not collecting server activities Guillaume Lelarge <guillaume@lelarge.info>
  0 siblings, 1 reply; 18+ messages in thread

From: Gnanakumar @ 2010-03-31 06:41 UTC (permalink / raw)
  To: pgsql-admin

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

^ permalink  raw  reply  [nested|flat] 18+ messages in thread

* Re: Statistics Collector not collecting server activities
  2010-03-31 06:41 Statistics Collector not collecting server activities Gnanakumar <gnanam@zoniac.com>
@ 2010-03-31 07:31 ` Guillaume Lelarge <guillaume@lelarge.info>
  2010-03-31 08:58   ` Re: Statistics Collector not collecting server activities Gnanakumar <gnanam@zoniac.com>
  0 siblings, 1 reply; 18+ messages in thread

From: Guillaume Lelarge @ 2010-03-31 07:31 UTC (permalink / raw)
  To: gnanam@zoniac.com; +Cc: pgsql-admin

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



^ permalink  raw  reply  [nested|flat] 18+ messages in thread

* Re: Statistics Collector not collecting server activities
  2010-03-31 06:41 Statistics Collector not collecting server activities Gnanakumar <gnanam@zoniac.com>
  2010-03-31 07:31 ` Re: Statistics Collector not collecting server activities Guillaume Lelarge <guillaume@lelarge.info>
@ 2010-03-31 08:58   ` Gnanakumar <gnanam@zoniac.com>
  2010-03-31 09:04     ` Re: Statistics Collector not collecting server activities Guillaume Lelarge <guillaume@lelarge.info>
  0 siblings, 1 reply; 18+ messages in thread

From: Gnanakumar @ 2010-03-31 08:58 UTC (permalink / raw)
  To: 'Guillaume Lelarge' <guillaume@lelarge.info>; +Cc: 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.

-----Original Message-----
From: Guillaume Lelarge [mailto:guillaume@lelarge.info] 
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 é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




^ permalink  raw  reply  [nested|flat] 18+ messages in thread

* Re: Statistics Collector not collecting server activities
  2010-03-31 06:41 Statistics Collector not collecting server activities Gnanakumar <gnanam@zoniac.com>
  2010-03-31 07:31 ` Re: Statistics Collector not collecting server activities Guillaume Lelarge <guillaume@lelarge.info>
  2010-03-31 08:58   ` Re: Statistics Collector not collecting server activities Gnanakumar <gnanam@zoniac.com>
@ 2010-03-31 09:04     ` Guillaume Lelarge <guillaume@lelarge.info>
  2010-03-31 09:14       ` Re: Statistics Collector not collecting server activities Gnanakumar <gnanam@zoniac.com>
  0 siblings, 1 reply; 18+ messages in thread

From: Guillaume Lelarge @ 2010-03-31 09:04 UTC (permalink / raw)
  To: gnanam@zoniac.com; +Cc: pgsql-admin

Le 31/03/2010 10:58, Gnanakumar a écrit :
> 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.
> 

If it is off (as you found with the "show stats_start_collector"
statement), you should getting ride of the # in front of the
stats_start_collector parameter. Ie, you should have

stats_start_collector = on

and not

#stats_start_collector = on

or

#stats_start_collector = off

Once you've done this, restart PostgreSQL and it should work.


-- 
Guillaume.
 http://www.postgresqlfr.org
 http://dalibo.com



^ permalink  raw  reply  [nested|flat] 18+ messages in thread

* Re: Statistics Collector not collecting server activities
  2010-03-31 06:41 Statistics Collector not collecting server activities Gnanakumar <gnanam@zoniac.com>
  2010-03-31 07:31 ` Re: Statistics Collector not collecting server activities Guillaume Lelarge <guillaume@lelarge.info>
  2010-03-31 08:58   ` Re: Statistics Collector not collecting server activities Gnanakumar <gnanam@zoniac.com>
  2010-03-31 09:04     ` Re: Statistics Collector not collecting server activities Guillaume Lelarge <guillaume@lelarge.info>
@ 2010-03-31 09:14       ` Gnanakumar <gnanam@zoniac.com>
  2010-03-31 09:26         ` Re: Statistics Collector not collecting server activities Guillaume Lelarge <guillaume@lelarge.info>
  0 siblings, 1 reply; 18+ messages in thread

From: Gnanakumar @ 2010-03-31 09:14 UTC (permalink / raw)
  To: 'Guillaume Lelarge' <guillaume@lelarge.info>; +Cc: pgsql-admin

OK.  I'll try that way.

But, as per 8.2 doc, by default it is ON. So if I comment with just '#'
infront of the parameter, and restart PostgreSQL, this change will not be
reflected, which means it should work with default value ON?

-----Original Message-----
From: Guillaume Lelarge [mailto:guillaume@lelarge.info] 
Sent: Wednesday, March 31, 2010 2:35 PM
To: gnanam@zoniac.com
Cc: pgsql-admin@postgresql.org
Subject: Re: [ADMIN] Statistics Collector not collecting server activities

Le 31/03/2010 10:58, Gnanakumar a écrit :
> 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.
> 

If it is off (as you found with the "show stats_start_collector"
statement), you should getting ride of the # in front of the
stats_start_collector parameter. Ie, you should have

stats_start_collector = on

and not

#stats_start_collector = on

or

#stats_start_collector = off

Once you've done this, restart PostgreSQL and it should work.


-- 
Guillaume.
 http://www.postgresqlfr.org
 http://dalibo.com




^ permalink  raw  reply  [nested|flat] 18+ messages in thread

* Re: Statistics Collector not collecting server activities
  2010-03-31 06:41 Statistics Collector not collecting server activities Gnanakumar <gnanam@zoniac.com>
  2010-03-31 07:31 ` Re: Statistics Collector not collecting server activities Guillaume Lelarge <guillaume@lelarge.info>
  2010-03-31 08:58   ` Re: Statistics Collector not collecting server activities Gnanakumar <gnanam@zoniac.com>
  2010-03-31 09:04     ` Re: Statistics Collector not collecting server activities Guillaume Lelarge <guillaume@lelarge.info>
  2010-03-31 09:14       ` Re: Statistics Collector not collecting server activities Gnanakumar <gnanam@zoniac.com>
@ 2010-03-31 09:26         ` Guillaume Lelarge <guillaume@lelarge.info>
  2010-03-31 10:51           ` Re: Statistics Collector not collecting server activities Gnanakumar <gnanam@zoniac.com>
  0 siblings, 1 reply; 18+ messages in thread

From: Guillaume Lelarge @ 2010-03-31 09:26 UTC (permalink / raw)
  To: gnanam@zoniac.com; +Cc: pgsql-admin

Le 31/03/2010 11:14, Gnanakumar a écrit :
> OK.  I'll try that way.
> 
> But, as per 8.2 doc, by default it is ON. So if I comment with just '#'
> infront of the parameter, and restart PostgreSQL, this change will not be
> reflected, which means it should work with default value ON?

Yes, you're right. Maybe you have stats_start_collector at different
places in your postgresql.conf. The last value is used in this case. So
you should better check this.


-- 
Guillaume.
 http://www.postgresqlfr.org
 http://dalibo.com



^ permalink  raw  reply  [nested|flat] 18+ messages in thread

* Re: Statistics Collector not collecting server activities
  2010-03-31 06:41 Statistics Collector not collecting server activities Gnanakumar <gnanam@zoniac.com>
  2010-03-31 07:31 ` Re: Statistics Collector not collecting server activities Guillaume Lelarge <guillaume@lelarge.info>
  2010-03-31 08:58   ` Re: Statistics Collector not collecting server activities Gnanakumar <gnanam@zoniac.com>
  2010-03-31 09:04     ` Re: Statistics Collector not collecting server activities Guillaume Lelarge <guillaume@lelarge.info>
  2010-03-31 09:14       ` Re: Statistics Collector not collecting server activities Gnanakumar <gnanam@zoniac.com>
  2010-03-31 09:26         ` Re: Statistics Collector not collecting server activities Guillaume Lelarge <guillaume@lelarge.info>
@ 2010-03-31 10:51           ` Gnanakumar <gnanam@zoniac.com>
  2010-03-31 12:26             ` Re: Statistics Collector not collecting server activities Guillaume Lelarge <guillaume@lelarge.info>
  0 siblings, 1 reply; 18+ messages in thread

From: Gnanakumar @ 2010-03-31 10:51 UTC (permalink / raw)
  To: 'Guillaume Lelarge' <guillaume@lelarge.info>; +Cc: pgsql-admin

After restarting PostgreSQL, I can see the following parameters are set to
ON:
mydb=# show stats_start_collector;
 stats_start_collector
-----------------------
 on
(1 row)

mydb=# show stats_start_collector;
 stats_start_collector
-----------------------
 on
(1 row)

mydb=# show stats_block_level;
 stats_block_level
-------------------
 on
(1 row)

mydb=# show stats_reset_on_server_start;
 stats_reset_on_server_start
-----------------------------
 off
(1 row)

But still, if I query after performing heavy DML operations, I'm always
getting zero, even though there are INSERT/UPDATE/DELETE.
select pg_stat_get_tuples_inserted((select oid from pg_class where relname =
'mytable'));

Is there any other parameter I'm missing to make this work.

-----Original Message-----
From: Guillaume Lelarge [mailto:guillaume@lelarge.info] 
Sent: Wednesday, March 31, 2010 2:56 PM
To: gnanam@zoniac.com
Cc: pgsql-admin@postgresql.org
Subject: Re: [ADMIN] Statistics Collector not collecting server activities

Le 31/03/2010 11:14, Gnanakumar a écrit :
> OK.  I'll try that way.
> 
> But, as per 8.2 doc, by default it is ON. So if I comment with just '#'
> infront of the parameter, and restart PostgreSQL, this change will not be
> reflected, which means it should work with default value ON?

Yes, you're right. Maybe you have stats_start_collector at different
places in your postgresql.conf. The last value is used in this case. So
you should better check this.


-- 
Guillaume.
 http://www.postgresqlfr.org
 http://dalibo.com




^ permalink  raw  reply  [nested|flat] 18+ messages in thread

* Re: Statistics Collector not collecting server activities
  2010-03-31 06:41 Statistics Collector not collecting server activities Gnanakumar <gnanam@zoniac.com>
  2010-03-31 07:31 ` Re: Statistics Collector not collecting server activities Guillaume Lelarge <guillaume@lelarge.info>
  2010-03-31 08:58   ` Re: Statistics Collector not collecting server activities Gnanakumar <gnanam@zoniac.com>
  2010-03-31 09:04     ` Re: Statistics Collector not collecting server activities Guillaume Lelarge <guillaume@lelarge.info>
  2010-03-31 09:14       ` Re: Statistics Collector not collecting server activities Gnanakumar <gnanam@zoniac.com>
  2010-03-31 09:26         ` Re: Statistics Collector not collecting server activities Guillaume Lelarge <guillaume@lelarge.info>
  2010-03-31 10:51           ` Re: Statistics Collector not collecting server activities Gnanakumar <gnanam@zoniac.com>
@ 2010-03-31 12:26             ` Guillaume Lelarge <guillaume@lelarge.info>
  2010-03-31 13:22               ` Re: Statistics Collector not collecting server activities Gnanakumar <gnanam@zoniac.com>
  0 siblings, 1 reply; 18+ messages in thread

From: Guillaume Lelarge @ 2010-03-31 12:26 UTC (permalink / raw)
  To: gnanam@zoniac.com; +Cc: pgsql-admin

Le 31/03/2010 12:51, Gnanakumar a écrit :
> After restarting PostgreSQL, I can see the following parameters are set to
> ON:
> mydb=# show stats_start_collector;
>  stats_start_collector
> -----------------------
>  on
> (1 row)
> 
> mydb=# show stats_start_collector;
>  stats_start_collector
> -----------------------
>  on
> (1 row)
> 
> mydb=# show stats_block_level;
>  stats_block_level
> -------------------
>  on
> (1 row)
> 
> mydb=# show stats_reset_on_server_start;
>  stats_reset_on_server_start
> -----------------------------
>  off
> (1 row)
> 
> But still, if I query after performing heavy DML operations, I'm always
> getting zero, even though there are INSERT/UPDATE/DELETE.
> select pg_stat_get_tuples_inserted((select oid from pg_class where relname =
> 'mytable'));
> 
> Is there any other parameter I'm missing to make this work.
> 

Nope. But you didn't show stats_row_level. If it's on too, try "select *
from pg_stat_user_tables".


-- 
Guillaume.
 http://www.postgresqlfr.org
 http://dalibo.com



^ permalink  raw  reply  [nested|flat] 18+ messages in thread

* Re: Statistics Collector not collecting server activities
  2010-03-31 06:41 Statistics Collector not collecting server activities Gnanakumar <gnanam@zoniac.com>
  2010-03-31 07:31 ` Re: Statistics Collector not collecting server activities Guillaume Lelarge <guillaume@lelarge.info>
  2010-03-31 08:58   ` Re: Statistics Collector not collecting server activities Gnanakumar <gnanam@zoniac.com>
  2010-03-31 09:04     ` Re: Statistics Collector not collecting server activities Guillaume Lelarge <guillaume@lelarge.info>
  2010-03-31 09:14       ` Re: Statistics Collector not collecting server activities Gnanakumar <gnanam@zoniac.com>
  2010-03-31 09:26         ` Re: Statistics Collector not collecting server activities Guillaume Lelarge <guillaume@lelarge.info>
  2010-03-31 10:51           ` Re: Statistics Collector not collecting server activities Gnanakumar <gnanam@zoniac.com>
  2010-03-31 12:26             ` Re: Statistics Collector not collecting server activities Guillaume Lelarge <guillaume@lelarge.info>
@ 2010-03-31 13:22               ` Gnanakumar <gnanam@zoniac.com>
  2010-03-31 14:28                 ` Re: Statistics Collector not collecting server activities Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 18+ messages in thread

From: Gnanakumar @ 2010-03-31 13:22 UTC (permalink / raw)
  To: 'Guillaume Lelarge' <guillaume@lelarge.info>; +Cc: pgsql-admin

show stats_row_level is also showing ON.
mydb=# show stats_row_level;
 stats_row_level
-----------------
 on
(1 row)

I also ran "select * from pg_stat_user_tables", all columns are showing
either 0 or NULL value for all the tables in my database.  I don't find any
values other than this for the entire tables in the database.

-----Original Message-----
From: Guillaume Lelarge [mailto:guillaume@lelarge.info] 
Sent: Wednesday, March 31, 2010 5:57 PM
To: gnanam@zoniac.com
Cc: pgsql-admin@postgresql.org
Subject: Re: [ADMIN] Statistics Collector not collecting server activities

Le 31/03/2010 12:51, Gnanakumar a écrit :
> After restarting PostgreSQL, I can see the following parameters are set to
> ON:
> mydb=# show stats_start_collector;
>  stats_start_collector
> -----------------------
>  on
> (1 row)
> 
> mydb=# show stats_start_collector;
>  stats_start_collector
> -----------------------
>  on
> (1 row)
> 
> mydb=# show stats_block_level;
>  stats_block_level
> -------------------
>  on
> (1 row)
> 
> mydb=# show stats_reset_on_server_start;
>  stats_reset_on_server_start
> -----------------------------
>  off
> (1 row)
> 
> But still, if I query after performing heavy DML operations, I'm always
> getting zero, even though there are INSERT/UPDATE/DELETE.
> select pg_stat_get_tuples_inserted((select oid from pg_class where relname
=
> 'mytable'));
> 
> Is there any other parameter I'm missing to make this work.
> 

Nope. But you didn't show stats_row_level. If it's on too, try "select *
from pg_stat_user_tables".


-- 
Guillaume.
 http://www.postgresqlfr.org
 http://dalibo.com




^ permalink  raw  reply  [nested|flat] 18+ messages in thread

* Re: Statistics Collector not collecting server activities
  2010-03-31 06:41 Statistics Collector not collecting server activities Gnanakumar <gnanam@zoniac.com>
  2010-03-31 07:31 ` Re: Statistics Collector not collecting server activities Guillaume Lelarge <guillaume@lelarge.info>
  2010-03-31 08:58   ` Re: Statistics Collector not collecting server activities Gnanakumar <gnanam@zoniac.com>
  2010-03-31 09:04     ` Re: Statistics Collector not collecting server activities Guillaume Lelarge <guillaume@lelarge.info>
  2010-03-31 09:14       ` Re: Statistics Collector not collecting server activities Gnanakumar <gnanam@zoniac.com>
  2010-03-31 09:26         ` Re: Statistics Collector not collecting server activities Guillaume Lelarge <guillaume@lelarge.info>
  2010-03-31 10:51           ` Re: Statistics Collector not collecting server activities Gnanakumar <gnanam@zoniac.com>
  2010-03-31 12:26             ` Re: Statistics Collector not collecting server activities Guillaume Lelarge <guillaume@lelarge.info>
  2010-03-31 13:22               ` Re: Statistics Collector not collecting server activities Gnanakumar <gnanam@zoniac.com>
@ 2010-03-31 14:28                 ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 18+ messages in thread

From: Tom Lane @ 2010-03-31 14:28 UTC (permalink / raw)
  To: gnanam@zoniac.com; +Cc: 'Guillaume Lelarge' <guillaume@lelarge.info>; pgsql-admin

"Gnanakumar" <gnanam@zoniac.com> writes:
>> But still, if I query after performing heavy DML operations, I'm always
>> getting zero, even though there are INSERT/UPDATE/DELETE.

Is the stats collector actually running according to "ps"?  If not, look
in the postmaster log to see why it failed (problems creating the
communication socket are the most common cause).

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 18+ messages in thread

* Re: Statistics Collector not collecting server activities
@ 2010-03-31 07:27 Gnanakumar <gnanam@zoniac.com>
  2010-03-31 21:42 ` Re: Statistics Collector not collecting server activities Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 18+ messages in thread

From: Gnanakumar @ 2010-03-31 07:27 UTC (permalink / raw)
  To: 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@zoniac.com] 
Sent: Wednesday, March 31, 2010 12:11 PM
To: pgsql-admin@postgresql.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'));

Attachments:

  winmail.dat (application/ms-tnef, 5.9K) download

^ permalink  raw  reply  [nested|flat] 18+ messages in thread

* Re: Statistics Collector not collecting server activities
  2010-03-31 07:27 Re: Statistics Collector not collecting server activities Gnanakumar <gnanam@zoniac.com>
@ 2010-03-31 21:42 ` Tom Lane <tgl@sss.pgh.pa.us>
  2010-04-09 13:33   ` Re: Statistics Collector not collecting server activities Gnanakumar <gnanam@zoniac.com>
  0 siblings, 1 reply; 18+ messages in thread

From: Tom Lane @ 2010-03-31 21:42 UTC (permalink / raw)
  To: gnanam@zoniac.com; +Cc: pgsql-admin

"Gnanakumar" <gnanam@zoniac.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



^ permalink  raw  reply  [nested|flat] 18+ messages in thread

* Re: Statistics Collector not collecting server activities
  2010-03-31 07:27 Re: Statistics Collector not collecting server activities Gnanakumar <gnanam@zoniac.com>
  2010-03-31 21:42 ` Re: Statistics Collector not collecting server activities Tom Lane <tgl@sss.pgh.pa.us>
@ 2010-04-09 13:33   ` Gnanakumar <gnanam@zoniac.com>
  2010-04-09 14:06     ` Re: Statistics Collector not collecting server activities Kevin Grittner <Kevin.Grittner@wicourts.gov>
  0 siblings, 1 reply; 18+ messages in thread

From: Gnanakumar @ 2010-04-09 13:33 UTC (permalink / raw)
  To: 'Tom Lane' <tgl@sss.pgh.pa.us>; +Cc: 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@sss.pgh.pa.us] 
Sent: Thursday, April 01, 2010 3:13 AM
To: gnanam@zoniac.com
Cc: pgsql-admin@postgresql.org
Subject: Re: [ADMIN] Statistics Collector not collecting server activities 

"Gnanakumar" <gnanam@zoniac.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




^ permalink  raw  reply  [nested|flat] 18+ messages in thread

* Re: Statistics Collector not collecting server activities
  2010-03-31 07:27 Re: Statistics Collector not collecting server activities Gnanakumar <gnanam@zoniac.com>
  2010-03-31 21:42 ` Re: Statistics Collector not collecting server activities Tom Lane <tgl@sss.pgh.pa.us>
  2010-04-09 13:33   ` Re: Statistics Collector not collecting server activities Gnanakumar <gnanam@zoniac.com>
@ 2010-04-09 14:06     ` Kevin Grittner <Kevin.Grittner@wicourts.gov>
  2010-04-10 06:24       ` Re: Statistics Collector not collecting server	 activities Gnanakumar <gnanam@zoniac.com>
  0 siblings, 1 reply; 18+ messages in thread

From: Kevin Grittner @ 2010-04-09 14:06 UTC (permalink / raw)
  To: 'Tom Lane' <tgl@sss.pgh.pa.us>; gnanam@zoniac.com; +Cc: pgsql-admin

"Gnanakumar" <gnanam@zoniac.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



^ permalink  raw  reply  [nested|flat] 18+ messages in thread

* Re: Statistics Collector not collecting server	 activities
  2010-03-31 07:27 Re: Statistics Collector not collecting server activities Gnanakumar <gnanam@zoniac.com>
  2010-03-31 21:42 ` Re: Statistics Collector not collecting server activities Tom Lane <tgl@sss.pgh.pa.us>
  2010-04-09 13:33   ` Re: Statistics Collector not collecting server activities Gnanakumar <gnanam@zoniac.com>
  2010-04-09 14:06     ` Re: Statistics Collector not collecting server activities Kevin Grittner <Kevin.Grittner@wicourts.gov>
@ 2010-04-10 06:24       ` Gnanakumar <gnanam@zoniac.com>
  0 siblings, 0 replies; 18+ messages in thread

From: Gnanakumar @ 2010-04-10 06:24 UTC (permalink / raw)
  To: 'Kevin Grittner' <Kevin.Grittner@wicourts.gov>; 'Tom Lane' <tgl@sss.pgh.pa.us>; +Cc: 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.Grittner@wicourts.gov] 
Sent: Friday, April 09, 2010 7:36 PM
To: 'Tom Lane'; gnanam@zoniac.com
Cc: pgsql-admin@postgresql.org
Subject: Re: [ADMIN] Statistics Collector not collecting server activities

"Gnanakumar" <gnanam@zoniac.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




^ permalink  raw  reply  [nested|flat] 18+ messages in thread

* Re: Statistics Collector not collecting server activities
@ 2010-04-11 17:56 Kevin Grittner <Kevin.Grittner@wicourts.gov>
  2010-08-02 10:35 ` Re: Statistics Collector not collecting server		 activities Gnanakumar <gnanam@zoniac.com>
  0 siblings, 1 reply; 18+ messages in thread

From: Kevin Grittner @ 2010-04-11 17:56 UTC (permalink / raw)
  To: gnanam@zoniac.com; +Cc: pgsql-admin

"Gnanakumar"  wrote:
 
> Does stats collector process need any other special
> resource/privilege/operations/port to start?
 
If I understand correctly, it uses UDP.  I don't think PostgreSQL
uses UDP outside of that.
 
-Kevin





^ permalink  raw  reply  [nested|flat] 18+ messages in thread

* Re: Statistics Collector not collecting server		 activities
  2010-04-11 17:56 Re: Statistics Collector not collecting server activities Kevin Grittner <Kevin.Grittner@wicourts.gov>
@ 2010-08-02 10:35 ` Gnanakumar <gnanam@zoniac.com>
  2010-08-02 14:04   ` Re: Statistics Collector not collecting server activities Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 18+ messages in thread

From: Gnanakumar @ 2010-08-02 10:35 UTC (permalink / raw)
  To: 'Kevin Grittner' <Kevin.Grittner@wicourts.gov>; +Cc: pgsql-admin

>> Does stats collector process need any other special
>> resource/privilege/operations/port to start?
 
> If I understand correctly, it uses UDP.  I don't think PostgreSQL
> uses UDP outside of that.
 
Still I'm not able to resolve/fix this statistics collector (not
starting/working) in one of our customer production server and because of
this autovacuum daemon is also not able to perform its job effectively,
thereby it is indirectly impacting on the disk space growth.

There are no anti-virus program running, no SE-Linux, etc.  I've pasted
below my "/etc/sysconfig/iptables" to reveal my firewall rules.

Does PostgreSQL establish working UDP sockets on some specific defined port
or it chooses the port randomly?

Looking at experts guidance to resolve my issue.

=================================
[root@dbserver ~]# more /etc/sysconfig/iptables
# Generated by iptables-save v1.3.5 on Mon Sep 14 20:04:30 2009
*nat
:PREROUTING ACCEPT [10934:1556118]
:POSTROUTING ACCEPT [0:0]
:OUTPUT ACCEPT [111392:6686084]
-A PREROUTING -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 5050
-A POSTROUTING -j MASQUERADE
-A OUTPUT -d 192.168.0.200 -p tcp -m tcp --dport 80 -j DNAT --to-destination
192.168.0.200:5050
-A OUTPUT -d 127.0.0.1 -p tcp -m tcp --dport 80 -j DNAT --to-destination
127.0.0.1:5050
COMMIT
# Completed on Mon Sep 14 20:04:30 2009
# Generated by iptables-save v1.3.5 on Mon Sep 14 20:04:30 2009
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -j ACCEPT
-A FORWARD -j ACCEPT
-A OUTPUT -j ACCEPT
COMMIT
# Completed on Mon Sep 14 20:04:30 2009
=================================





^ permalink  raw  reply  [nested|flat] 18+ messages in thread

* Re: Statistics Collector not collecting server activities
  2010-04-11 17:56 Re: Statistics Collector not collecting server activities Kevin Grittner <Kevin.Grittner@wicourts.gov>
  2010-08-02 10:35 ` Re: Statistics Collector not collecting server		 activities Gnanakumar <gnanam@zoniac.com>
@ 2010-08-02 14:04   ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 18+ messages in thread

From: Tom Lane @ 2010-08-02 14:04 UTC (permalink / raw)
  To: gnanam@zoniac.com; +Cc: 'Kevin Grittner' <Kevin.Grittner@wicourts.gov>; pgsql-admin

"Gnanakumar" <gnanam@zoniac.com> writes:
> Does PostgreSQL establish working UDP sockets on some specific defined port
> or it chooses the port randomly?

The stats collector socket is opened on whatever port bind() chooses to
assign.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 18+ messages in thread


end of thread, other threads:[~2010-08-02 14:04 UTC | newest]

Thread overview: 18+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2010-03-31 06:41 Statistics Collector not collecting server activities Gnanakumar <gnanam@zoniac.com>
2010-03-31 07:31 ` Guillaume Lelarge <guillaume@lelarge.info>
2010-03-31 08:58   ` Gnanakumar <gnanam@zoniac.com>
2010-03-31 09:04     ` Guillaume Lelarge <guillaume@lelarge.info>
2010-03-31 09:14       ` Gnanakumar <gnanam@zoniac.com>
2010-03-31 09:26         ` Guillaume Lelarge <guillaume@lelarge.info>
2010-03-31 10:51           ` Gnanakumar <gnanam@zoniac.com>
2010-03-31 12:26             ` Guillaume Lelarge <guillaume@lelarge.info>
2010-03-31 13:22               ` Gnanakumar <gnanam@zoniac.com>
2010-03-31 14:28                 ` Tom Lane <tgl@sss.pgh.pa.us>
2010-03-31 07:27 Re: Statistics Collector not collecting server activities Gnanakumar <gnanam@zoniac.com>
2010-03-31 21:42 ` Tom Lane <tgl@sss.pgh.pa.us>
2010-04-09 13:33   ` Gnanakumar <gnanam@zoniac.com>
2010-04-09 14:06     ` Kevin Grittner <Kevin.Grittner@wicourts.gov>
2010-04-10 06:24       ` Re: Statistics Collector not collecting server	 activities Gnanakumar <gnanam@zoniac.com>
2010-04-11 17:56 Re: Statistics Collector not collecting server activities Kevin Grittner <Kevin.Grittner@wicourts.gov>
2010-08-02 10:35 ` Re: Statistics Collector not collecting server		 activities Gnanakumar <gnanam@zoniac.com>
2010-08-02 14:04   ` Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox