Skip to content

Fix connection search path being reset

Thong Kuah requested to merge fix_reset_all into master

What does this MR do?

RESET ALL is reseting too many parameters, we should reset only the parameter we just set, namely statement_timeout

https://www.postgresql.org/docs/12/sql-reset.html

In #337813 (closed), we are planning to use PostgreSQL database schemas to separate tables. To do so in a backwards compatible way we need to set the search_path configuration parameter. Unfortunately, tests fail (example: https://gitlab.com/gitlab-org/gitlab/-/jobs/1484972168) because anytime we hit this method, all configuration parameters are reset to their default values, all tests after that fails.

We should not be resetting all parameters anyway - we only need to reset the one that we just manipulated, namely statement_timeout.

Related issue: #337813 (closed)

Screenshots or Screencasts (strongly suggested)

How to setup and validate locally (strongly suggested)

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Edited by Thong Kuah

Merge request reports