Re: Monitoring for long running transactions

Поиск
Список
Период
Сортировка
От Thomas Kellerer
Тема Re: Monitoring for long running transactions
Дата
Msg-id 4c717cc5-ac33-fd9a-a928-e78a46b63f69@gmx.net
обсуждение исходный текст
Ответ на Re: Monitoring for long running transactions  (Samuel Smith <pgsql@net153.net>)
Список pgsql-general
Samuel Smith schrieb am 04.06.2020 um 21:59:
> Sorry, I should have clarified that I was aware of the
> pg_stat_activity table. That is how we found the problem in the first
> place. And yes I could just write a bash script and run it in cron. I
> just didn't know if there was a more "official" way to go about this
> since it is probably a common monitoring point and/or if something
> like this was already made.

What about setting idle_in_transaction_session_timeout to some reasonably high value (15 minutes?)

Then you would get an error in your application because the connection was terminated and you would learn early about
theproblem.
 
Even with monitoring enabled, you would probably still kill those sessions manually as the application most probably
can'tcommit them properly any more.
 

Thomas





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

Предыдущее
От: Christoph Moench-Tegeder
Дата:
Сообщение: Re: Monitoring for long running transactions
Следующее
От: "Peter J. Holzer"
Дата:
Сообщение: Re: Move configuration files with pg_upgrade