Displaying current query - eliminating

Поиск
Список
Период
Сортировка
От Rieback Melanie
Тема Displaying current query - eliminating
Дата
Msg-id Pine.GSO.4.56.0510220011270.19088@flits.few.vu.nl
обсуждение исходный текст
Ответы Re: Displaying current query - eliminating  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-novice
This may come across as an odd question, but here goes..

To see the current query in PostgreSQL, the normal procedure is to type:
SELECT current_query FROM pg_stat_activity;

Now here's my question..    I want PostgreSQL to react sufficiently
quickly that the result says:

              current_query
-------------------------------------------
SELECT current_query FROM pg_stat_activity;
(1 row)

and not:

 current_query
---------------
 <IDLE>
(1 row)

In trying to achieve this behavior, I have taken the following actions:

In postgresql.conf:
stats_start_collector = true
stats_command_string = true
stats_block_level = true
stats_row_level = true
stats_reset_on_server_start = true

I also typed at the console:
\set pgstat_stat_interval 0;

This actually worked once, but since then, PostgreSQL has always reported
<IDLE>.  I've tried changing other environment variables, but with
no luck.  Nothing I've done so far has gotten it to respond consistently
in the quick-responding manner that I want.

Does anyone have any advice on how to achieve this desired behavior
consistantly?  I would be really appreciative if anyone had any tips.

Thanks!!!
Melanie R.

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

Предыдущее
От:
Дата:
Сообщение: Re: Importing data
Следующее
От: Michael Glaesemann
Дата:
Сообщение: Re: Database design advice