Timing out A Blocker Based on Time or Count of Waiters

Поиск
Список
Период
Сортировка
От Fred Habash
Тема Timing out A Blocker Based on Time or Count of Waiters
Дата
Msg-id CADpeV5yrSVGjKoK_cLwyf3KaQXkbTan8MjtmaZgACrbmWmc8Pg@mail.gmail.com
обсуждение исходный текст
Ответы Re: Timing out A Blocker Based on Time or Count of Waiters
Re: Timing out A Blocker Based on Time or Count of Waiters
Re: Timing out A Blocker Based on Time or Count of Waiters
Список pgsql-general
Facing an issue where sometimes humans login to a database and run DDL statements causing a long locking tree of over 1000 waiters. As a workaround, we asked developers to always start their DDL sessions with 'SET lock_timeout = 'Xs'. 

I reviewed the native lock timeout parameter in Postgres and found 7. None seem to be related to blocker timeouts directly.

idle_in_transaction_session_timeout
idle_session_timeout
lock_timeout: How long a session waits for a lock
statement_timeout
authentication_timeout
deadlock_timeout
log_lock_waits

Instead, I put together a quick procedure that counts waiter sessions for a given blocker and terminates it if waiter count exceeds a threshold.

Is there not a native way to ...
1. Automatically time out a blocker
2. A metric that shows how many waiters for a blocker?

Thanks
--

----------------------------------------
Thank you


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

Предыдущее
От: Thiemo Kellner
Дата:
Сообщение: Re: PostgreSQL as advanced job queuing system
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: Timing out A Blocker Based on Time or Count of Waiters