I want to set
idle_in_transaction_session_timeout which allows for a timeout for unclosed/uncommitted transactions.
Unfortunately, this setting isn't available for instance wide configuration at this moment. You can set this in a transaction and depending on which ORM/driver you're using it may even support setting
idle_in_transaction_session_timeout at that level.