Re: IDLE in transaction introspection - Mailing list pgsql-hackers

From Magnus Hagander
Subject Re: IDLE in transaction introspection
Date
Msg-id CABUevEy3g6iQ_0d2_vAgrMnwH2Byv8z0mV6heUCBMiHn_LPMmw@mail.gmail.com
Whole thread Raw
In response to Re: IDLE in transaction introspection  (Simon Riggs <simon@2ndQuadrant.com>)
Responses Re: IDLE in transaction introspection
Re: IDLE in transaction introspection
List pgsql-hackers
On Tue, Nov 1, 2011 at 13:19, Simon Riggs <simon@2ndquadrant.com> wrote:
> On Mon, Oct 31, 2011 at 10:13 PM, Robert Haas <robertmhaas@gmail.com> wrote:
>> On Mon, Oct 31, 2011 at 5:45 PM, Magnus Hagander <magnus@hagander.net> wrote:
>>> Actually, for the future, it might be useful to have a "state" column,
>>> that holds the idle/in transaction/running status, instead of the
>>> tools having to parse the query text to get that information...
>>
>> +1 for doing it this way.  Splitting "current_query" into "query" and
>> "state" would be more elegant and easier to use all around.
>
> Why not leave it exactly as it is, and add a previous_query column?
>
> That gives you exactly what you need without breaking anything.

That would be the backwards compatible way I suggested.

That said, I think there's still value in exposing a "state" column,
and to encourage people not to rely on the text in the query column.
Then you can add it to your list of things to remove in 10.0 :-)

--
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/


pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: IDLE in transaction introspection
Next
From: Simon Riggs
Date:
Subject: Re: IDLE in transaction introspection