Decrease statement_timeout in staging
We have statement_timeout settings in gstg that are not consistent with production. We should align that, for example to allow issues with migrations to surface earlier before they're tried in production.
While the global statemnt_timeout in gstg is 15s, individual per-user settings are different:
root@patroni-06-db-gstg.c.gitlab-staging-1.internal:/var/opt/gitlab/postgresql# gitlab-psql -U gitlab
Password for user gitlab:
psql (9.6.15)
SSL connection (protocol: TLSv1.2, cipher: ECDHE-RSA-AES256-GCM-SHA384, bits: 256, compression: off)
Type "help" for help.
gitlabhq_production=> show statement_timeout;
statement_timeout
-------------------
5min
(1 row)
The statement_timeout has been set individually for gitlab user, see pg_user table:
gitlab | 16384 | f | f | f | f | ******** | | {statement_timeout=5min}
We should reset this to 15s to align with production. Since staging is a lot smaller than production, we might still not catch all issues - but that's another topic.
Edited by Andreas Brandl