Statistics Collector not collecting server activities

Statistics Collector not collecting server activities

am 31.03.2010 08:41:26 von Gnanam

This is a multipart message in MIME format.

------=_NextPart_000_0076_01CAD0CB.4C282BC0
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit

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


------=_NextPart_000_0076_01CAD0CB.4C282BC0
Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:x=3D"urn:schemas-microsoft-com:office:excel" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" =
xmlns=3D"http://www.w3.org/TR/REC-html40">


charset=3Dus-ascii">









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 =3D on



#update_process_title =3D on



 



#stats_start_collector =3D on



class=3DMsoNormal>         &=
nbsp;           &n=
bsp;           &nb=
sp;           &nbs=
p;            =
;            =
         



#stats_block_level =3D off



#stats_row_level =3D off



stats_block_level =3D on



stats_row_level =3D on



#stats_reset_on_server_start =3D off =



 



# - Statistics Monitoring -



 



#log_parser_stats =3D off



#log_planner_stats =3D off



#log_executor_stats =3D off



#log_statement_stats =3D off



 



I’m always getting zero value for all the =
tables.



 



select pg_stat_get_tuples_inserted((select oid from =
pg_class
where relname =3D 'mytable'));



select pg_stat_get_tuples_updated((select oid from =
pg_class
where relname =3D 'mytable'));



select pg_stat_get_tuples_deleted((select oid from =
pg_class
where relname =3D 'mytable'));









------=_NextPart_000_0076_01CAD0CB.4C282BC0--

Re: Statistics Collector not collecting server activities

am 31.03.2010 09:27:35 von Gnanam

This is a multipart message in MIME format.

------=_NextPart_000_008C_01CAD0D1.BEBFBEE0
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit

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


------=_NextPart_000_008C_01CAD0D1.BEBFBEE0
Content-Type: application/ms-tnef;
name="winmail.dat"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="winmail.dat"

eJ8+IicHAQaQC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/58PoB8CwNaQYwPginBulF+RUV90dVDAHQKwXyOAAzFu4GQo
KPGxdW9pZJJw1lCQwLHhb68jtv+4D6mVd5MQAqAgMQKgbG5hbwBvoSdtwnmT
QycpKTuhL6I//6Yvpz+oT6lfqm+sz6yPwc+/rq+vv7DPsd+y4bKwZG7R/7OP
tJ+1r7a/t8+437nvuv//vA+9H74vvz/AT8Kv1o/Df+/Ej8Wfxq+yPGTcccjf
ye//yv/MD80fzi/PP9BP0V/Sbz/Tf9SP1Z/X/+vf2M0xMOHlUS9kaXbbCegY
6lwn7d/xr+S2NTjm0WJvvGR55b7zT/Xf5MY35tErpBLlvTP3ZX36sAADAA00
/T+jBgMADzT9P6MGAgEUNAEAAAAQAAAATklUQfm/uAEAqgA32W4AAAIBfwAB
AAAAMQAAADAwMDAwMDAwRkZFMzk4M0FENzVDOTM0MTlEQTczREIwMjE5NUY0
RDU4NDM0NEEwMAAAAAADAAYQc7CbWwMABxCBBAAAAwAQEAAAAAADABEQAAAA
AB4ACBABAAAAZQAAAElNQUxTT1NFRUlOR0FXRUlSRFRISU5HSUZJRE9TSE9X
U1RBVFNTVEFSVENPTExFQ1RPUjtJTlNJREVQU1FMLElUU0FZU09GRklWRUFM
U09SRVNUQVJURURNWVNFUlZFUk1BTlkAAAAA4v4=

------=_NextPart_000_008C_01CAD0D1.BEBFBEE0
Content-Type: text/plain
Content-Disposition: inline
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable


--=20
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

------=_NextPart_000_008C_01CAD0D1.BEBFBEE0--

Re: Statistics Collector not collecting server activities

am 31.03.2010 09:31:52 von Guillaume Lelarge

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 runni=
ng 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 reln=
ame =3D
> 'mytable'));
>=20
> select pg_stat_get_tuples_updated((select oid from pg_class where relna=
me =3D
> 'mytable'));
>=20
> select pg_stat_get_tuples_deleted((select oid from pg_class where relna=
me =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

--=20
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

Re: Statistics Collector not collecting server activities

am 31.03.2010 10:58:41 von Gnanam

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-confi g-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
> 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
> PostgreSQL version 8.2
>=20
>
>=20
> Parameters enabled related to this are:
>=20
> # - Query/Index Statistics Collector -
>=20
>
>=20
> #stats_command_string =3D on
>=20
> #update_process_title =3D on
>=20
>
>=20
> #stats_start_collector =3D on
>=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
> # - Statistics Monitoring -
>=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
> I'm always getting zero value for all the tables.
>=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


--=20
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

Re: Statistics Collector not collecting server activities

am 31.03.2010 11:04:50 von Guillaume Lelarge

Le 31/03/2010 10:58, Gnanakumar a =E9crit :
> I=92m also seeing a weird thing. If I do =91show stats_start_collector=
;=92 inside
> psql, it says =91off=92.
>=20
> I=92ve also restarted my server many times after making all the changes=
..
>=20
> As per 8.2 doc,
> http://www.postgresql.org/docs/8.2/interactive/runtime-confi g-statistic=
s.htm
> l, stats_start_collector is on by default.
>=20

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 =3D on

and not

#stats_start_collector =3D on

or

#stats_start_collector =3D off

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


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

--=20
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

Re: Statistics Collector not collecting server activities

am 31.03.2010 11:14:58 von Gnanam

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]=20
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 =E9crit :
> I=92m also seeing a weird thing. If I do =91show stats_start_collector;=
=92
inside
> psql, it says =91off=92.
>=20
> I=92ve also restarted my server many times after making all the changes.
>=20
> As per 8.2 doc,
>
http://www.postgresql.org/docs/8.2/interactive/runtime-confi g-statistics.htm
> l, stats_start_collector is on by default.
>=20

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 =3D on

and not

#stats_start_collector =3D on

or

#stats_start_collector =3D off

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


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


--=20
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

Re: Statistics Collector not collecting server activities

am 31.03.2010 11:26:23 von Guillaume Lelarge

Le 31/03/2010 11:14, Gnanakumar a =E9crit :
> OK. I'll try that way.
>=20
> 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.


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

--=20
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

Re: Statistics Collector not collecting server activities

am 31.03.2010 12:51:12 von Gnanam

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

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

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

mydb=3D# 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 =
=3D
'mytable'));

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

-----Original Message-----
From: Guillaume Lelarge [mailto:guillaume@lelarge.info]=20
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 =E9crit :
> OK. I'll try that way.
>=20
> 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.


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


--=20
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

Re: Statistics Collector not collecting server activities

am 31.03.2010 14:26:47 von Guillaume Lelarge

Le 31/03/2010 12:51, Gnanakumar a =E9crit :
> After restarting PostgreSQL, I can see the following parameters are set=
to
> ON:
> mydb=3D# show stats_start_collector;
> stats_start_collector
> -----------------------
> on
> (1 row)
>=20
> mydb=3D# show stats_start_collector;
> stats_start_collector
> -----------------------
> on
> (1 row)
>=20
> mydb=3D# show stats_block_level;
> stats_block_level
> -------------------
> on
> (1 row)
>=20
> mydb=3D# show stats_reset_on_server_start;
> stats_reset_on_server_start
> -----------------------------
> off
> (1 row)
>=20
> 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 reln=
ame =3D
> 'mytable'));
>=20
> Is there any other parameter I'm missing to make this work.
>=20

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


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

--=20
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

Re: Statistics Collector not collecting server activities

am 31.03.2010 15:22:53 von Gnanam

show stats_row_level is also showing ON.
mydb=3D# 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]=20
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 =E9crit :
> After restarting PostgreSQL, I can see the following parameters are set to
> ON:
> mydb=3D# show stats_start_collector;
> stats_start_collector
> -----------------------
> on
> (1 row)
>=20
> mydb=3D# show stats_start_collector;
> stats_start_collector
> -----------------------
> on
> (1 row)
>=20
> mydb=3D# show stats_block_level;
> stats_block_level
> -------------------
> on
> (1 row)
>=20
> mydb=3D# show stats_reset_on_server_start;
> stats_reset_on_server_start
> -----------------------------
> off
> (1 row)
>=20
> 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
=3D
> 'mytable'));
>=20
> Is there any other parameter I'm missing to make this work.
>=20

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


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


--=20
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

Re: Statistics Collector not collecting server activities

am 31.03.2010 16:28:31 von Tom Lane

"Gnanakumar" 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

--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

Re: Statistics Collector not collecting server activities

am 31.03.2010 23:42:46 von Tom Lane

"Gnanakumar" 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

--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

Re: Statistics Collector not collecting server activities

am 09.04.2010 15:33:28 von Gnanam

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" 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


--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

Re: Statistics Collector not collecting server

am 09.04.2010 16:06:01 von Kevin Grittner

"Gnanakumar" 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

--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

Re: Statistics Collector not collecting server activities

am 10.04.2010 08:24:56 von Gnanam

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" 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


--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

Re: Statistics Collector not collecting server

am 11.04.2010 19:56:33 von Kevin Grittner

"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



--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

Re: Statistics Collector not collecting server activities

am 02.08.2010 12:35:56 von Gnanam

>> 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
=================================



--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

Re: Statistics Collector not collecting server activities

am 02.08.2010 16:04:01 von Tom Lane

"Gnanakumar" 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

--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin