Re: Fwd: weird long time query - Mailing list pgsql-bugs

From hubert depesz lubaczewski
Subject Re: Fwd: weird long time query
Date
Msg-id 20191218162349.GA11569@depesz.com
Whole thread Raw
In response to Re: Fwd: weird long time query  (Kaijiang Chen <chenkaijiang@gmail.com>)
Responses Re: Fwd: weird long time query  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
On Thu, Dec 19, 2019 at 12:14:26AM +0800, Kaijiang Chen wrote:
> Thanks!
> I learn the SQL from the web. pg views should be better.
> BTW, I got the similar result (still see that proc) with "select * from
> pg_stat_activity":
> 
> backend_start    | 2019-11-25 16:27:05.103901+08
> xact_start       |
> query_start      | 2019-11-25 16:29:29.529318+08
> state_change     | 2019-11-25 16:29:29.529344+08
> waiting          | f
> state            | idle
> backend_xid      |
> backend_xmin     |
> query            | DEALLOCATE pdo_stmt_00000388
> 
> Looks not very nice :-)

not sure what you mean by not nice.

As you can clearly see the backend is *NOT* running anything (state is
idle).

Value in "query" column is simply last query that it ran. It *finished*
running this query at 2019-11-25 16:29:29.529344+08.

So your app is keeping connection open. It's not Pg problem or a bug.

Best regards,

depesz




pgsql-bugs by date:

Previous
From: Kaijiang Chen
Date:
Subject: Re: Fwd: weird long time query
Next
From: Tom Lane
Date:
Subject: Re: Fwd: weird long time query