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
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.
In response to
pgsql-hackers by date
|Next:||From: Tom Lane||Date: 2009-07-24 15:15:00|
|Subject: Re: display previous query string of idle-in-transaction |
|Previous:||From: Robert Haas||Date: 2009-07-24 14:58:15|
|Subject: Re: display previous query string of idle-in-transaction|