Re: Fwd: weird long time query

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Fwd: weird long time query
Дата
Msg-id 5855.1576686643@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Fwd: weird long time query  (hubert depesz lubaczewski <depesz@depesz.com>)
Список pgsql-bugs
hubert depesz lubaczewski <depesz@depesz.com> writes:
> On Thu, Dec 19, 2019 at 12:14:26AM +0800, Kaijiang Chen wrote:
>> BTW, I got the similar result (still see that proc) with "select * from
>> pg_stat_activity":
>> ...
>> state            | idle
>> ...
>> query            | DEALLOCATE pdo_stmt_00000388
>> 
>> Looks not very nice :-)

> not sure what you mean by not nice.

That's a feature not a bug (and yes, the behavior is documented).
People requested that the view continue to display the last query
of an idle session.  IIRC, the main argument was that otherwise
it's hard to tell apart a bunch of idle sessions.

If you don't like it, you can always do something like

case when state = idle then null else query end

            regards, tom lane



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

Предыдущее
От: hubert depesz lubaczewski
Дата:
Сообщение: Re: Fwd: weird long time query
Следующее
От: Alexander Lakhin
Дата:
Сообщение: Re: BUG #16161: pg_ctl stop fails sometimes (on Windows)