Re: idle processes - Mailing list pgsql-general

From Johann Spies
Subject Re: idle processes
Date
Msg-id CAGZ55DTp+7giO__8+EADgamML6YzfUzkDk=UnVo8pP40zcLgZg@mail.gmail.com
Whole thread Raw
In response to Re: idle processes  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
Thanks Adrian and Tom.

Tom wrote:

It's not entirely clear what your question is, but here are some possible
answers:

1. For quite some time now, the "query" column in pg_stat_activity has
been defined as "the query currently or most recently run by the session";
it's intentional that it doesn't go back to "<idle>" anymore.  You need to
look at the "state" column to tell whether the session is actively running
the query or not.

2. Are you sure that operating system user "crest" isn't connecting as
database user "postgres"?


Yes.
 
3. pg_cancel_backend() is only supposed to terminate the current query
(if any), not kill the session.  If you want the latter try
pg_terminate_backend().


Thanks.  I was under the wrong impression that  pg_cancel_backend() will do both.

That answers about all my questions.

Regards
Johann

pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Question about copy from with timestamp format
Next
From: Uriy Zhuravlev
Date:
Subject: Oracle baseline/baseplan/outplan in Postgres