Re: Meaning of query age in pg_stat_activity - Mailing list pgsql-general

From Jan De Moerloose
Subject Re: Meaning of query age in pg_stat_activity
Date
Msg-id CAF06xsTvbuVHLNK+nHKixr9kxpmfie_bXBYHSdpj4CJxsbiGPw@mail.gmail.com
Whole thread Raw
In response to Re: Meaning of query age in pg_stat_activity  (Nikolay Samokhvalov <samokhvalov@gmail.com>)
Responses Re: Meaning of query age in pg_stat_activity
List pgsql-general
The state is 'idle in transaction'.

On Tue, Jan 30, 2018 at 12:10 AM, Nikolay Samokhvalov <samokhvalov@gmail.com> wrote:
On Mon, Jan 29, 2018 at 3:06 PM, Jan De Moerloose <jan@sensolus.com> wrote:
...
SELECT pid, age(clock_timestamp(),query_start) as age, usename, query, state from pg_stat_activity order by age;

When the cpu is 100% and the app slowing down, i can see that some queries have a long age.

What is the value of "state" column for those queries? 


pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Meaning of query age in pg_stat_activity
Next
From: Nikolay Samokhvalov
Date:
Subject: Re: Meaning of query age in pg_stat_activity