From: | Michael Fuhr <mike(at)fuhr(dot)org> |
---|---|
To: | "Ed L(dot)" <pgsql(at)bluepolka(dot)net>, Scott Marlowe <smarlowe(at)g2switchworks(dot)com>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: vacuum vs open transactions |
Date: | 2005-01-13 18:37:27 |
Message-ID: | 20050113183726.GA31620@winnie.fuhr.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Thu, Jan 13, 2005 at 07:11:09PM +0100, Martijn van Oosterhout wrote:
>
> Wouldn't the transaction ID be more useful. An earlier transaction ID
> obviously started earlier. So you should be able to identify the oldest
> transaction. Would the transaction ID field in pg_locks do?
That'll show which transaction is oldest but not how long it's been
open or idle, i.e., whether it's "long-open" or not. I assumed,
perhaps incorrectly, that he was already looking at pg_locks and
wanted to find out which of those transactions had been open for a
long time. Since pg_locks has a pid column, you can join (visually
or via a join query) with pg_stat_activity's procpid column.
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2005-01-13 18:38:11 | Re: allowing connections from additional hosts without a restart? |
Previous Message | Peter Eisentraut | 2005-01-13 18:28:02 | Re: allowing connections from additional hosts without a restart? |