Re: [JDBC] Statement is still active at the back-end even after closing - Mailing list pgsql-jdbc

From David G. Johnston
Subject Re: [JDBC] Statement is still active at the back-end even after closing
Date
Msg-id CAKFQuwa1m0JhsUt-RcmfGY9M5SeTAMOkXHByXVODet272VShaA@mail.gmail.com
Whole thread Raw
In response to [JDBC] Statement is still active at the back-end even after closing  (Syam Pillai <syam@engravgroup.com>)
List pgsql-jdbc
On Thu, Aug 31, 2017 at 1:50 AM, Syam Pillai <syam@engravgroup.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.


pgsql-jdbc by date:

Previous
From: Dave Cramer
Date:
Subject: Re: [JDBC] Statement is still active at the back-end even after closing
Next
From: Frédéric Trégon
Date:
Subject: [JDBC] RETURN_GENERATED_KEYS does not work when insert statement is using a"with" query.