Re: Finding if old transactions are running...

Поиск
Список
Период
Сортировка
От Vsevolod Lobko
Тема Re: Finding if old transactions are running...
Дата
Msg-id 20050224184739.GB85119@robin.ip.net.ua
обсуждение исходный текст
Ответ на Re: Finding if old transactions are running...  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Thu, Feb 24, 2005 at 11:14:07AM -0500, Tom Lane wrote:
> Christopher Kings-Lynne <chriskl@familyhealth.com.au> writes:
> >> It sure would be nice to be able to have a way to query the start time
> >> of the eldest transaction on the system.  If that could be done at a
> >> not-too-high cost, it would be eminently helpful for various sorts of
> >> maintenance processes so that you could assortedly:
> 
> > You can get that from pg_stat_activity, if you have the relevant stats 
> > turned on.
> 
> pg_stat_activity will tell you about the oldest active query, but not
> about oldest open transaction.

You can get list of currently runing transactions from pg_locks table, 
but no start time...
But if you can remember oldest transaction_id from the last vacuum then 
you got what you need: if oldest transaction still here - you not 
need to vacuum


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

Предыдущее
От: Greg Stark
Дата:
Сообщение: Re: [pgsql-hackers-win32] win32 performance - fsync question
Следующее
От: John DeSoi
Дата:
Сообщение: Re: Some download statistics