Re: idle_in_transaction_session_timeout for a set of SQL statements

Поиск
Список
Период
Сортировка
От Jeremy Finzel
Тема Re: idle_in_transaction_session_timeout for a set of SQL statements
Дата
Msg-id CAMa1XUhCFu4SxHpX0Ef3xaa1OJb7_zdVS=Li9T_EjQdqH7Efuw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: idle_in_transaction_session_timeout for a set of SQL statements  (Michael Lewis <mlewis@entrata.com>)
Список pgsql-general
SET lock_timeout TO '1s';

No, my assumption is that lock_timeout does not cover my use case here.  My point is actually that any one statement is not hitting lock_timeout, but as a whole the transaction takes too long.  For example if I set lock_timeout to 1 second, but my migration actually has 10 SQL statements each of which take just under a second, I have a total now of a near 10-second lockout.

Regardless of whether or not I am technically going idle, I want to be able to abort based on transaction time length.  I do believe I can handle this externally via the timeout command, but curious still if there is any way to reliably do it from within postgres.

Thanks,
Jeremy 

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

Предыдущее
От: "Peter J. Holzer"
Дата:
Сообщение: Re: why not using a mountpoint as PGDATA?
Следующее
От: Mark Fletcher
Дата:
Сообщение: Re: Barman disaster recovery solution