Disable transaction time outs when running database backups
With the introduction of setting snapshots for backupping decomposed gitlab setups, we need to ensure that the snapshots do not timeout due to transaction timeout settings in PostgreSQL.
We can do the very same thing as what pg_dump is doing: set idle_in_transaction_session_timeout
, lock_timeout
and statement_timeout
to 0, meaning these timeouts are disabled.
It could be that these settings cause related to gitlab-com/gl-infra/production#8283 (closed)
In the previous version of the backup rake task, we were not using transactions on the application level. Data consistency was only ensured by pg_dump
. So these time outs never showed up