Re: vacuum vs open transactions - Mailing list pgsql-general

From Alvaro Herrera
Subject Re: vacuum vs open transactions
Date
Msg-id 20050113155029.GB20142@dcc.uchile.cl
Whole thread Raw
In response to Re: vacuum vs open transactions  ("Ed L." <pgsql@bluepolka.net>)
List pgsql-general
On Thu, Jan 13, 2005 at 08:45:38AM -0700, Ed L. wrote:
> On Thursday January 13 2005 5:50, Alvaro Herrera wrote:
> > On Wed, Jan 12, 2005 at 11:30:50PM -0700, Michael Fuhr wrote:
> > > On Wed, Jan 12, 2005 at 11:49:12AM -0700, Ed L. wrote:
> > > > Is it possible via SQL query to tell how long a transaction has been
> > > > open?

> > now() returns the current transaction's start time.
>
> That would be perfect if I could see that for transactions other than my
> own.

No, there's no way to know that.  Unless, of course, you save it
yourself somewhere at transaction start (though because of isolation,
using a regular table would not help you any.  Perhaps some PL's shared
data can help you there.)

--
Alvaro Herrera (<alvherre[@]dcc.uchile.cl>)
Este mail se entrega garantizadamente 100% libre de sarcasmo.

pgsql-general by date:

Previous
From: Greg Stark
Date:
Subject: Re: [HACKERS] Much Ado About COUNT(*)
Next
From: Tom Lane
Date:
Subject: Re: Trace triggers