aboutsummaryrefslogtreecommitdiff
path: root/sqitch
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2020-10-01 22:30:39 +0100
committerChristopher Baines <mail@cbaines.net>2020-10-01 22:30:39 +0100
commit6e0e33addfbec945b1deefe1f1991db5eeb889ef (patch)
tree2856e68de7de8aaab3fb48c740085975d4adafdf /sqitch
parentc05a8e4e9f0e9c4ea348bcf71672de9c1ee3da46 (diff)
downloaddata-service-6e0e33addfbec945b1deefe1f1991db5eeb889ef.tar
data-service-6e0e33addfbec945b1deefe1f1991db5eeb889ef.tar.gz
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.
Diffstat (limited to 'sqitch')
-rw-r--r--sqitch/deploy/change_autovacuum_config.sql20
-rw-r--r--sqitch/revert/change_autovacuum_config.sql7
-rw-r--r--sqitch/sqitch.plan1
-rw-r--r--sqitch/verify/change_autovacuum_config.sql7
4 files changed, 35 insertions, 0 deletions
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 <daniela@linux-ijv5> # Add tsvectors per locale
change_package_descriptions_index 2020-08-23T11:56:00Z Christopher Baines <mail@cbaines.net> # Change the package_descriptions index
change_locale_values 2020-09-26T10:20:22Z Christopher Baines <mail@cbaines.net> # Change locale values
+change_autovacuum_config 2020-10-01T21:24:46Z Christopher Baines <mail@cbaines.net> # 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;