'show full processlist' in postgres?

Поиск
Список
Период
Сортировка
От Erik Wasser
Тема 'show full processlist' in postgres?
Дата
Msg-id 200507011558.46408.erik.wasser@iquer.net
обсуждение исходный текст
Ответы Re: 'show full processlist' in postgres?  ("Jim Buttafuoco" <jim@contactbda.com>)
Список pgsql-sql
Hallo pgsql-sql@postgresql.org,

I'm looking for a way to display the active querys of postgres. The 
mysql way is a 'show [full] processlist'.

After I've read http://pgsqld.active-venture.com/monitoring-stats.html I 
set STATS_COMMAND_STRING, STATS_BLOCK_LEVEL, STATS_ROW_LEVEL and 
STATS_START_COLLECTOR to 'true'.

Then I executed the query from the bottom of the page:

> SELECT pg_stat_get_backend_pid(S.backendid) AS procpid,
>    pg_stat_get_backend_activity(S.backendid) AS current_query
>    FROM (SELECT pg_stat_get_backend_idset() AS backendid) AS S;

The result was:
procpid | current_query
---------+---------------   1367 |  27387 |    930 |  28425 | <IDLE>
(4 rows)

Why there isn't any query in the 'current_query' row? Calling the query 
multiple times just changes the PID (sometimes) but 'current_query' was 
always empty. How do I show up the a list of querys that will be 
processed right in this moment?

P.S: I'm using postgresql 7.4.7 and I was logged I as 'postgres'.

-- 
So long... Fuzz


В списке pgsql-sql по дате отправления:

Предыдущее
От: Vadivel Subramaniam
Дата:
Сообщение: SQLCloseCursor() or SQLFreeStmt does not free memory allcated to read CLOB field in Oracle.
Следующее
От: "Nick Stone"
Дата:
Сообщение: Some help please