Re: getting the current query from pg_stat_activity

From: Si Chen <sichen(at)opensourcestrategies(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: getting the current query from pg_stat_activity
Date: 2014-03-31 20:33:12
Message-ID: CAAYSSjOTge0Twma=XcU+7O+yDtnMg-xk2_85hdSDduNQLwRrKA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Thanks! That's very helpful and answers my question.

On Mon, Mar 31, 2014 at 12:52 PM, David Johnston <polobo(at)yahoo(dot)com> wrote:

> Si Chen-2 wrote
> > I have two different postgresql servers running slightly [different]
> > versions.
>
> Versions 9.0 and 9.2 are NOT slightly different. These are two MAJOR
> RELEASES (which allow for API changes) apart (i.e., one major release in
> between - 9.1)
>
> The release notes for 9.2 note this particular change explicitly:
>
> http://www.postgresql.org/docs/9.2/interactive/release-9-2.html
>
> Section E.9.2.6
>
> Note the presence of the "state" column in the 9.2 schema - you use this to
> determine if a connection is "idle" instead of looking for "<IDLE>" in a
> query column which then allows the query column to be report the "last
> known
> query" at all times.
>
> David J.
>
>
>
>
>
>
> --
> View this message in context:
> http://postgresql.1045698.n5.nabble.com/getting-the-current-query-from-pg-stat-activity-tp5798076p5798098.html
> Sent from the PostgreSQL - general mailing list archive at Nabble.com.
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>

--
Si Chen
Open Source Strategies, Inc.
sichen(at)opensourcestrategies(dot)com
http://www.OpenSourceStrategies.com
LinkedIn: http://www.linkedin.com/in/opentaps
Twitter: http://twitter.com/opentaps

In response to

Browse pgsql-general by date

  From Date Subject
Next Message David Johnston 2014-03-31 20:34:04 Re: Getting sequence-generated IDs from multiple row insert
Previous Message Moshe Jacobson 2014-03-31 20:32:06 Re: Wanted: ALTER TRIGGER ... OWNED BY EXTENSION