Lock Timeout alternative in Postgres

Viewed 15

I need to kill my session, if I am blocking other sessions.But as of now we have only option to kill own session blocked by other sessions using lock_timeout. Do we have option in postgres to timeout own session, if our session blocked other sessions not own session blocked by others ?

1 Answers

You should set idle_in_transaction_session_timeout and statement_timeout. Then your blocking session gets killed if it runs too long statements and if it hangs idle in a database transaction.

Related