Re: Limit transaction lifetime

2020-03-06 Thread Fabio Ugo Venchiarutti
On 06/03/2020 16:14, Andrei Zhidenkov wrote: If it's a single command you're trying to limit `SET statement_timeout TO ` should do the trick. This will set only statement timeout but won’t work for long transactions that contain a lot of short statements. If you want it based on the

Re: Limit transaction lifetime

2020-03-06 Thread Andrei Zhidenkov
> If it's a single command you're trying to limit `SET statement_timeout TO > ` should do the trick. This will set only statement timeout but won’t work for long transactions that contain a lot of short statements. > If you want it based on the session's cumulative statement time, off the

Re: Limit transaction lifetime

2020-03-06 Thread Fabio Ugo Venchiarutti
On 06/03/2020 14:24, Andrei Zhidenkov wrote: Is there a way to limit a transaction lifetime in PostgreSQL? I could use `idle_in_transaction_session_timeout` parameter but it applies only to IDLE transactions. However, I want to rollback any transaction that executes more than specified

Limit transaction lifetime

2020-03-06 Thread Andrei Zhidenkov
Is there a way to limit a transaction lifetime in PostgreSQL? I could use `idle_in_transaction_session_timeout` parameter but it applies only to IDLE transactions. However, I want to rollback any transaction that executes more than specified period of time. -- With best regards, Andrei