pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: hubert depesz lubaczewski <depesz@depesz.com>
To: Kaijiang Chen <chenkaijiang@gmail.com>
Cc: Pg Bugs <pgsql-bugs@postgresql.org>
Subject: Re: Fwd: weird long time query
Date: Wed, 18 Dec 2019 17:23:49 +0100
Message-ID: <20191218162349.GA11569@depesz.com> (raw)
In-Reply-To: <CAAkGvS9Us7C1r6eSPEz-NbazySX-GGOBtwAjczhFzg_hR9CsMA@mail.gmail.com>
References: <CAAkGvS8ocfeVFOCsxoAY6suzMkrW+O9twRAQ2c4WrZNbQ=vSpg@mail.gmail.com>
	<CAAkGvS_FSZf=uzTwWbTnRe7hXruga_opSeCPDueNR09v9Ow47Q@mail.gmail.com>
	<20191218140631.GA1083@depesz.com>
	<CAAkGvS9Us7C1r6eSPEz-NbazySX-GGOBtwAjczhFzg_hR9CsMA@mail.gmail.com>

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






view thread (9+ messages)  latest in thread

Message-ID: <20191218162349.GA11569@depesz.com>
Permalink:  ../20191218162349.GA11569@depesz.com/
Also on:    postgresql.org/message-id/20191218162349.GA11569@depesz.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 using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: depesz@depesz.com, chenkaijiang@gmail.com, pgsql-bugs@postgresql.org
  Subject: Re: Fwd: weird long time query
  In-Reply-To: <20191218162349.GA11569@depesz.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