What determines the time waited for Postgres Transaction Timeout?
idle_in_transaction_session_timeout (integer)

Releases locks on open transactions that have become idle.

idle_in_transaction_session_timeout parameter