`disable_statement_timeout` will no longer leak to other migrations
What does this MR do?
Adds transaction: true/false
(defaults to true) to disable_statement_timeout
. This controls whether SET LOCAL
will be used to define statement_timeout
value to 0
.
When transaction: false
it requires a block, so the code inside the block will be executed with "disabled statement timeout", after it executes it cleans up connection state with RESET ALL
.
Are there points in the code the reviewer needs to double check?
Please double-check if I enclosed the right pieces while fixing existing migrations.
The EE build is in here: https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/6444 with any extra fix required in separate commits.
Why was this MR needed?
Using disable_statement_timeout
can leak to other transactions and queries inside the same connection, until connection is closed or RESET ALL
is called (from pgbouncer using isolation: transaction)
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Documentation created/updated -
Tests added for this feature/bug - Conform by the code review guidelines
-
Has been reviewed by a Database specialist
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Conform by the database guides -
End-to-end tests pass ( package-and-qa
manual pipeline job)
What are the relevant issue numbers?
Closes #48967 (closed)