Re: long running transactions

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: long running transactions
Дата
Msg-id 25404.1160497420@sss.pgh.pa.us
обсуждение исходный текст
Ответ на long running transactions  (Tobias Brox <tobias@nordicbet.com>)
Ответы Re: long running transactions
Список pgsql-performance
Tobias Brox <tobias@nordicbet.com> writes:
> If pg_stat_activity.query_start actually is the start time of the
> transaction,

... but it isn't.

> Is there any way to find the longest running transaction?

Look in pg_locks to see the lowest-numbered transaction ID --- each
transaction will be holding exclusive lock on its own XID.  You can
correlate that back to pg_stat_activity via the PID.

            regards, tom lane

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

Предыдущее
От: Tobias Brox
Дата:
Сообщение: long running transactions
Следующее
От: Bruno Wolff III
Дата:
Сообщение: Re: Simple join optimized badly?