Re: Displaying current query - eliminating

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Displaying current query - eliminating
Дата
Msg-id 27666.1129949925@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Displaying current query - eliminating  (Rieback Melanie <melanie@cs.vu.nl>)
Ответы Re: Displaying current query - eliminating  (Rieback Melanie <melanie@cs.vu.nl>)
Список pgsql-novice
Rieback Melanie <melanie@cs.vu.nl> writes:
> 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:
> SELECT current_query FROM pg_stat_activity;

Sorry, there's basically 0 chance of that happening with any
reliability.  The stats system is designed not to slow down actual
transactions at all, which is what it would have to do to guarantee
instantaneous response.

You could improve the reaction time by reducing PGSTAT_STAT_INTERVAL
in the source code (see backend/postmaster/pgstat.c), but you'll incur
corresponding increases in overhead, and you'll never get to the point
of certain repeatability.

            regards, tom lane

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

Предыдущее
От: Michael Glaesemann
Дата:
Сообщение: Re: Database design advice
Следующее
От: Rieback Melanie
Дата:
Сообщение: Re: Displaying current query - eliminating