Re: vacuum vs open transactions

Поиск
Список
Период
Сортировка
От Michael Fuhr
Тема Re: vacuum vs open transactions
Дата
Msg-id 20050113183726.GA31620@winnie.fuhr.org
обсуждение исходный текст
Ответ на Re: vacuum vs open transactions  (Martijn van Oosterhout <kleptog@svana.org>)
Список 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/

В списке pgsql-general по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: allowing connections from additional hosts without a restart?
Следующее
От: Michael Fuhr
Дата:
Сообщение: Re: Functions returning RECORD