Re: vacuum vs open transactions

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: vacuum vs open transactions
Дата
Msg-id 20050113181108.GC7067@svana.org
обсуждение исходный текст
Ответ на Re: vacuum vs open transactions  ("Ed L." <pgsql@bluepolka.net>)
Ответы Re: vacuum vs open transactions
Список pgsql-general
On Thu, Jan 13, 2005 at 08:44:56AM -0700, Ed L. wrote:
> Yes, I see that in 7.4 (not in 7.3).  But my purpose would be to remotely
> identify long-open transactions that are causing table bloat by making
> vacuum fail to reclaim space, so it seems I need the transaction start
> time, not query start time.  Most likely this situation occurs when 1)
> someone starts a transaction in psql and then leaves it there, or 2) an
> application opens a transaction prior to getting user input.

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?

Hope this helps,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

Вложения

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

Предыдущее
От: Doug McNaught
Дата:
Сообщение: Re: Adding UNIQUE constraint on NULL column
Следующее
От: Michael Fuhr
Дата:
Сообщение: Re: allowing connections from additional hosts without a restart?