Skip site navigation (1) Skip section navigation (2)

Re: display previous query string of idle-in-transaction

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Robert Haas" <robertmhaas(at)gmail(dot)com>
Cc: "Simon Riggs" <simon(at)2ndquadrant(dot)com>, "decibel" <decibel(at)decibel(dot)org>, "Greg Stark" <stark(at)enterprisedb(dot)com>, "Asko Oja" <ascoja(at)gmail(dot)com>, "Tatsuhito Kasahara" <kasahara(dot)tatsuhito(at)oss(dot)ntt(dot)co(dot)jp>, <pgsql-hackers(at)postgresql(dot)org>,"daveg" <daveg(at)sonic(dot)net>
Subject: Re: display previous query string of idle-in-transaction
Date: 2009-07-24 15:06:32
Message-ID: 4A6987A80200002500028D18@gw.wicourts.gov (view raw or flat)
Thread:
Lists: pgsql-hackers
Robert Haas <robertmhaas(at)gmail(dot)com> wrote: 
 
> Hmm, I don't think we'd need two columns for this, actually.  You
> could just have one column last_statement_endtime (not sure if it's
> the best name, but something along those lines) which would be NULL
> if the statement was still in progress and the appropriate timestamp
> if not.  You could infer idle from whether or not that column was
> NULL.
 
That would lose the ability to tell what the idle time was before the
latest statement began, but maybe that's not interesting enough to
justify another column....
 
>> Of course, you might be more interested in those which are idle in
>> a transaction, but that's easily done with these changes -- just
>> throw in xact_start IS NULL.
> 
> Surely if xact_start is NULL it is not in a transaction at all?
 
That's exactly the point I was trying to make.  Sorry if that appeared
to be saying anything else.
 
-Kevin

In response to

pgsql-hackers by date

Next:From: Tom LaneDate: 2009-07-24 15:15:00
Subject: Re: display previous query string of idle-in-transaction
Previous:From: Robert HaasDate: 2009-07-24 14:58:15
Subject: Re: display previous query string of idle-in-transaction

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group