Issue
I want to set idle_in_transaction_session_timeout
which allows for a timeout for unclosed/uncommitted transactions.
Resolution
Heroku Postgres doesn't allow ALTER SYSTEM
, however you can set idle_in_transaction_session_timeout
at a DATABASE
or ROLE
level, for example at the DATABASE
level:
SELECT current_database();
current_database
------------------
your-database-name
ALTER DATABASE your-database-name SET idle_in_transaction_session_timeout='30s'
You can also 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.