Re: idle processes

From: Johann Spies <johann(dot)spies(at)gmail(dot)com>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: idle processes
Date: 2015-08-06 11:30:36
Message-ID: CAGZ55DTp+7giO__8+EADgamML6YzfUzkDk=UnVo8pP40zcLgZg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Ramesh T 2015-08-06 13:21:53 postgres connection
Previous Message Adrian Klaver 2015-08-05 19:25:58 Re: Question about copy from with timestamp format