Commit 8e462453 authored by Andreas Brandl's avatar Andreas Brandl

Configure statement_timeout for dev/test

In sight of https://gitlab.com/gitlab-org/gitlab/-/issues/251084,
this change configures a `statement_timeout` for both development and
testing environments.
parent 90b901fb
...@@ -28,6 +28,8 @@ development: ...@@ -28,6 +28,8 @@ development:
username: postgres username: postgres
password: "secure password" password: "secure password"
host: localhost host: localhost
variables:
statement_timeout: 15s
# #
# Staging specific # Staging specific
...@@ -51,3 +53,5 @@ test: &test ...@@ -51,3 +53,5 @@ test: &test
password: password:
host: localhost host: localhost
prepared_statements: false prepared_statements: false
variables:
statement_timeout: 15s
...@@ -514,6 +514,7 @@ RSpec.describe Gitlab::Database::PartitioningMigrationHelpers::TableManagementHe ...@@ -514,6 +514,7 @@ RSpec.describe Gitlab::Database::PartitioningMigrationHelpers::TableManagementHe
allow(migration).to receive(:table_exists?).with(partitioned_table).and_return(true) allow(migration).to receive(:table_exists?).with(partitioned_table).and_return(true)
allow(migration).to receive(:copy_missed_records) allow(migration).to receive(:copy_missed_records)
allow(migration).to receive(:execute).with(/VACUUM/) allow(migration).to receive(:execute).with(/VACUUM/)
allow(migration).to receive(:execute).with(/^(RE)?SET/)
end end
it 'finishes remaining jobs for the correct table' do it 'finishes remaining jobs for the correct table' do
...@@ -567,6 +568,7 @@ RSpec.describe Gitlab::Database::PartitioningMigrationHelpers::TableManagementHe ...@@ -567,6 +568,7 @@ RSpec.describe Gitlab::Database::PartitioningMigrationHelpers::TableManagementHe
allow(Gitlab::BackgroundMigration).to receive(:steal) allow(Gitlab::BackgroundMigration).to receive(:steal)
allow(migration).to receive(:execute).with(/VACUUM/) allow(migration).to receive(:execute).with(/VACUUM/)
allow(migration).to receive(:execute).with(/^(RE)?SET/)
end end
it 'idempotently cleans up after failed background migrations' do it 'idempotently cleans up after failed background migrations' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment