Re: Meaning of query age in pg_stat_activity
От | Nikolay Samokhvalov |
---|---|
Тема | Re: Meaning of query age in pg_stat_activity |
Дата | |
Msg-id | CANNMO+JojuMWc7wCjvi_QRHfacfJtcZxdu8b=ohpEyZM8Uq6Tg@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Meaning of query age in pg_stat_activity (Nikolay Samokhvalov <samokhvalov@gmail.com>) |
Список | pgsql-general |
On Mon, Jan 29, 2018 at 9:52 PM, Nikolay Samokhvalov <samokhvalov@gmail.com> wrote:
On Mon, Jan 29, 2018 at 3:45 PM, Jan De Moerloose <jan@sensolus.com> wrote:So the query is just the latest query and the time is the transaction time since this query, i suppose ?Thanks for your answer, i will try to make the transaction shorter as you suggest.Yep. This is a very common confusion, however it usually happens regarding records with "state" = 'idle'– notice that they also have something in "query" column while they are actually doing nothing.
One correction:
"the time is the transaction time since this query" is not an accurate statement.
You mentioned query_ start – it reflects the last query's starting time, not transaction's.
There are other timestamps:
backend_start, xact_start, and state_change.
All of them are useful in different contexts.
В списке pgsql-general по дате отправления: