guix-data-service/sqitch/deploy/change_autovacuum_config.sql
Christopher Baines 6e0e33addf 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.
2020-10-01 22:30:39 +01:00

20 lines
860 B
PL/PgSQL

-- 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;