pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: David G. Johnston <david.g.johnston@gmail.com>
To: Syam Pillai <syam@engravgroup.com>
Cc: List <pgsql-jdbc@postgresql.org>
Subject: Re: Statement is still active at the back-end even after closing
Date: Thu, 31 Aug 2017 09:48:58 -0700
Message-ID: <CAKFQuwa1m0JhsUt-RcmfGY9M5SeTAMOkXHByXVODet272VShaA@mail.gmail.com> (raw)
In-Reply-To: <CAD-KuVN=Q8HTQaBrR850c7JoT6Qfq_OtvMYqtp2utgVxKr9-nA@mail.gmail.com>
References: <CAD-KuVN=Q8HTQaBrR850c7JoT6Qfq_OtvMYqtp2utgVxKr9-nA@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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.
​

view thread (5+ messages)

Message-ID: <CAKFQuwa1m0JhsUt-RcmfGY9M5SeTAMOkXHByXVODet272VShaA@mail.gmail.com>
Permalink:  ../CAKFQuwa1m0JhsUt-RcmfGY9M5SeTAMOkXHByXVODet272VShaA@mail.gmail.com/
Also on:    postgresql.org/message-id/CAKFQuwa1m0JhsUt-RcmfGY9M5SeTAMOkXHByXVODet272VShaA@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: david.g.johnston@gmail.com, syam@engravgroup.com
  Subject: Re: Statement is still active at the back-end even after closing
  In-Reply-To: <CAKFQuwa1m0JhsUt-RcmfGY9M5SeTAMOkXHByXVODet272VShaA@mail.gmail.com>
  References: <CAD-KuVN=Q8HTQaBrR850c7JoT6Qfq_OtvMYqtp2utgVxKr9-nA@mail.gmail.com> <CAKFQuwa1m0JhsUt-RcmfGY9M5SeTAMOkXHByXVODet272VShaA@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox