| From: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
|---|---|
| To: | Syam Pillai <syam(at)engravgroup(dot)com> |
| Cc: | List <pgsql-jdbc(at)postgresql(dot)org> |
| Subject: | Re: Statement is still active at the back-end even after closing |
| Date: | 2017-08-31 16:48:58 |
| Message-ID: | CAKFQuwa1m0JhsUt-RcmfGY9M5SeTAMOkXHByXVODet272VShaA@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-jdbc |
On Thu, Aug 31, 2017 at 1:50 AM, Syam Pillai <syam(at)engravgroup(dot)com> wrote:
>
> Query executed to check the activity:
> SELECT pid, datname, now() - pg_stat_activity.query_start AS duration,
> state, query
> FROM pg_stat_activity
> WHERE now() - pg_stat_activity.query_start > interval '1 second';
> Output from psql:
> pid | datname | duration | state | query
> -------+---------+-----------------+-------+---------------------------
> 17775 | xxxx | 00:00:07.481294 | idle | SELECT 1 FROM core.Person
>
>
state = "idle" which means that they query column is showing the last
executed query - not something that is presently running.
David J.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Frédéric Trégon | 2017-09-01 09:26:11 | RETURN_GENERATED_KEYS does not work when insert statement is using a "with" query. |
| Previous Message | Dave Cramer | 2017-08-31 16:40:53 | Re: Statement is still active at the back-end even after closing |