We have an issue with too many open connections in our staging DB Postgresql instance hosted on CloudSQL.
I would like to know if there is any workaround for idle_in_transaction_session_timeout command on CloudSQL. In order to be able to run this command, we would need to have superuser access which is unfortunately not the case for CloudSQL.
I would like to avoid setting up a batch job which would remove idle connections periodically. Can you think of a better alternative?
idle_in_transaction_session_timeoutcould be set on a db level. See example here