Re: vacuum vs open transactions

From: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
To: "Ed L(dot)" <pgsql(at)bluepolka(dot)net>
Cc: Michael Fuhr <mike(at)fuhr(dot)org>, Scott Marlowe <smarlowe(at)g2switchworks(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: vacuum vs open transactions
Date: 2005-01-13 15:50:29
Message-ID: 20050113155029.GB20142@dcc.uchile.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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[(at)]dcc(dot)uchile(dot)cl>)
Este mail se entrega garantizadamente 100% libre de sarcasmo.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2005-01-13 15:53:18 Re: Trace triggers
Previous Message Greg Stark 2005-01-13 15:50:22 Re: [HACKERS] Much Ado About COUNT(*)