Обсуждение: Statistics collecting problem

Поиск
Список
Период
Сортировка

Statistics collecting problem

От
"Nikolay Mihaylov"
Дата:
Hello,

Statistic collector not work!
Where we do mistake. This worked before on 7.3.2:





We have :

travelexpressus=# select version();
                                                 version
------------------------------------------------------------------------
---------------------------------
 PostgreSQL 7.4.2 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.3.2
20031022 (Red Hat Linux 3.3.2-1) (1 row)

travelexpressus=# \x
Expanded display is on.
travelexpressus=# show STATS_START_COLLECTOR;
-[ RECORD 1 ]---------+---
stats_start_collector | on

travelexpressus=# show STATS_COMMAND_STRING;
-[ RECORD 1 ]--------+---
stats_command_string | on

travelexpressus=# show STATS_BLOCK_LEVEL;
-[ RECORD 1 ]-----+---
stats_block_level | on

travelexpressus=# show STATS_ROW_LEVEL;
-[ RECORD 1 ]---+---
stats_row_level | on

travelexpressus=# show STATS_RESET_ON_SERVER_START;
-[ RECORD 1 ]---------------+---
stats_reset_on_server_start | on



--------------

travelexpressus=# select * from pg_stat_activity;
 datid | datname | procpid | usesysid | usename | current_query |
query_start
-------+---------+---------+----------+---------+---------------+-------
------
(0 rows)

travelexpressus=# select * from pg_stat_database ;
 datid |     datname     | numbackends | xact_commit | xact_rollback |
blks_read | blks_hit
-------+-----------------+-------------+-------------+---------------+--
---------+----------
 17142 | travelexpressus |           0 |           0 |             0 |0
|        0
     1 | template1       |           0 |           0 |             0 |0
|        0
 17141 | template0       |           0 |           0 |             0 |0
|        0


--------------------------------------

Conf file is like this one: (comments are removed)

tcpip_socket = true
max_connections = 512

STATS_START_COLLECTOR = TRUE
STATS_COMMAND_STRING = TRUE
STATS_BLOCK_LEVEL = TRUE
STATS_ROW_LEVEL = TRUE
STATS_RESET_ON_SERVER_START = TRUE


--------------------------------

Process list is like:

30792 ?        S      0:00 su - postgres -c
/usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data > /usr/loca
30793 ?        S      0:00  \_ -bash -c /usr/local/pgsql/bin/postmaster
-D /usr/local/pgsql/data > /usr/local/pg
30827 ?        S      0:00      \_ /usr/local/pgsql/bin/postmaster -D
/usr/local/pgsql/data HOSTNAME=localhost.l
30829 ?        S      0:00          \_ postgres: stats buffer process
30830 ?        S      0:00          |   \_ postgres: stats collector
process
31026 ?        S      0:00          \_ postgres: postgres
travelexpressus 1.1.1.1 idle
31033 ?        S      0:00          \_ postgres: postgres
travelexpressus 1.1.1.1 idle
31147 ?        S      0:00          \_ postgres: postgres
travelexpressus 1.1.1.1 idle
31289 ?        S      0:00          \_ postgres: postgres
travelexpressus 1.1.1.1 idle
31295 ?        S      0:00          \_ postgres: postgres
travelexpressus 1.1.1.1 idle
31299 ?        S      0:00          \_ postgres: postgres
travelexpressus 1.1.1.1 idle
31322 ?        S      0:00          \_ postgres: postgres
travelexpressus 1.1.1.1 idle
31335 ?        S      0:00          \_ postgres: postgre travelexpressus
1.1.1.1 idle





Re: Statistics collecting problem

От
Tom Lane
Дата:
"Nikolay Mihaylov" <pg@nmmm.nu> writes:
> Statistic collector not work!
> Where we do mistake. This worked before on 7.3.2:

Maybe some problem binding the UDP socket for statistics gathering?
Look at the first few lines of the postmaster's log to see if there's
any error messages concerning stats collector startup.

It seems possible also that the stats messages are being dropped due
to kernel packet filtering.  (In fact, that's probably the most likely
theory, because I think stats_start_collector would be set false if
the postmaster had detected any problems with binding the socket.)
Take a look at your ipchains or iptables configuration.

            regards, tom lane