From 6e0e33addfbec945b1deefe1f1991db5eeb889ef Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Thu, 1 Oct 2020 22:30:39 +0100 Subject: Change the autovacuum config for some tables Looking at data for the the patches deployment of the Guix Data Service, these tables look like they might benefit from vacuuming/analyzing more often, so adjust the configuration so this will hopefully happen. --- sqitch/deploy/change_autovacuum_config.sql | 20 ++++++++++++++++++++ sqitch/revert/change_autovacuum_config.sql | 7 +++++++ sqitch/sqitch.plan | 1 + sqitch/verify/change_autovacuum_config.sql | 7 +++++++ 4 files changed, 35 insertions(+) create mode 100644 sqitch/deploy/change_autovacuum_config.sql create mode 100644 sqitch/revert/change_autovacuum_config.sql create mode 100644 sqitch/verify/change_autovacuum_config.sql (limited to 'sqitch') diff --git a/sqitch/deploy/change_autovacuum_config.sql b/sqitch/deploy/change_autovacuum_config.sql new file mode 100644 index 0000000..09d2c12 --- /dev/null +++ b/sqitch/deploy/change_autovacuum_config.sql @@ -0,0 +1,20 @@ +-- Deploy guix-data-service:change_autovacuum_config to pg + +BEGIN; + +ALTER TABLE derivations SET (autovacuum_vacuum_scale_factor = 0.01); +ALTER TABLE derivations SET (autovacuum_analyze_scale_factor = 0.01); + +ALTER TABLE derivation_inputs SET (autovacuum_vacuum_scale_factor = 0.01); +ALTER TABLE derivation_inputs SET (autovacuum_analyze_scale_factor = 0.01); + +ALTER TABLE guix_revision_package_derivations SET (autovacuum_vacuum_scale_factor = 0.01); +ALTER TABLE guix_revision_package_derivations SET (autovacuum_analyze_scale_factor = 0.01); + +ALTER TABLE derivation_sources SET (autovacuum_vacuum_scale_factor = 0.01); +ALTER TABLE derivation_sources SET (autovacuum_analyze_scale_factor = 0.01); + +ALTER TABLE derivation_outputs SET (autovacuum_vacuum_scale_factor = 0.01); +ALTER TABLE derivation_outputs SET (autovacuum_analyze_scale_factor = 0.01); + +COMMIT; diff --git a/sqitch/revert/change_autovacuum_config.sql b/sqitch/revert/change_autovacuum_config.sql new file mode 100644 index 0000000..cf5d09b --- /dev/null +++ b/sqitch/revert/change_autovacuum_config.sql @@ -0,0 +1,7 @@ +-- Revert guix-data-service:change_autovacuum_config from pg + +BEGIN; + +-- XXX Add DDLs here. + +COMMIT; diff --git a/sqitch/sqitch.plan b/sqitch/sqitch.plan index 4d2b101..95d0392 100644 --- a/sqitch/sqitch.plan +++ b/sqitch/sqitch.plan @@ -69,3 +69,4 @@ derivation_output_details_sets_derivation_output_details_ids_index 2020-07-04T07 add-tsvectors-per-locale 2020-07-16T18:19:44Z daniela # Add tsvectors per locale change_package_descriptions_index 2020-08-23T11:56:00Z Christopher Baines # Change the package_descriptions index change_locale_values 2020-09-26T10:20:22Z Christopher Baines # Change locale values +change_autovacuum_config 2020-10-01T21:24:46Z Christopher Baines # Change autovacuum config diff --git a/sqitch/verify/change_autovacuum_config.sql b/sqitch/verify/change_autovacuum_config.sql new file mode 100644 index 0000000..6f05a2d --- /dev/null +++ b/sqitch/verify/change_autovacuum_config.sql @@ -0,0 +1,7 @@ +-- Verify guix-data-service:change_autovacuum_config on pg + +BEGIN; + +-- XXX Add verifications here. + +ROLLBACK; -- cgit v1.2.3