aboutsummaryrefslogtreecommitdiff
path: root/sqitch/deploy/increase_fillfactor_for_some_indexes.sql
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2020-02-08 11:16:08 +0000
committerChristopher Baines <mail@cbaines.net>2020-02-08 11:16:08 +0000
commitf1989e8758b89b2750f7a546871c0721ab9f9839 (patch)
treea762d9a8be4ba668d8f823f410134b43303eab3c /sqitch/deploy/increase_fillfactor_for_some_indexes.sql
parent77beb5949511db7fc5236567b8b1d25d98f82bbb (diff)
downloaddata-service-f1989e8758b89b2750f7a546871c0721ab9f9839.tar
data-service-f1989e8758b89b2750f7a546871c0721ab9f9839.tar.gz
Rework cross derivations support
Stop using the system values as targets, and remove package derivation entries where this is the case. Switch the non-cross derivation case to have a target of "", rather than matching the system, as this makes more sense, and is more consistent now that the target values no longer match the system values. Hardcode some more correct target values, and use these instead. Hopefully this can be better integrated with Guix in the future. This commit also includes a migration attempting to shrink some indexes.
Diffstat (limited to 'sqitch/deploy/increase_fillfactor_for_some_indexes.sql')
-rw-r--r--sqitch/deploy/increase_fillfactor_for_some_indexes.sql29
1 files changed, 29 insertions, 0 deletions
diff --git a/sqitch/deploy/increase_fillfactor_for_some_indexes.sql b/sqitch/deploy/increase_fillfactor_for_some_indexes.sql
new file mode 100644
index 0000000..93f8209
--- /dev/null
+++ b/sqitch/deploy/increase_fillfactor_for_some_indexes.sql
@@ -0,0 +1,29 @@
+-- Deploy guix-data-service:increase_fillfactor_for_some_indexes to pg
+
+BEGIN;
+
+ALTER INDEX derivation_inputs_pkey SET (fillfactor = 100);
+ALTER INDEX derivation_inputs_derivation_output_id_idx SET (fillfactor = 100);
+ALTER INDEX guix_revision_package_derivations_pkey SET (fillfactor = 100);
+ALTER INDEX derivations_pkey SET (fillfactor = 100);
+ALTER INDEX file_name_unique SET (fillfactor = 100);
+ALTER INDEX id_unique SET (fillfactor = 100);
+ALTER INDEX derivations_hash SET (fillfactor = 100);
+ALTER INDEX package_derivations_pkey SET (fillfactor = 100);
+ALTER INDEX package_derivations_id_key SET (fillfactor = 100);
+ALTER INDEX package_derivations_derivation_id SET (fillfactor = 100);
+ALTER INDEX package_derivations_package_id_idx SET (fillfactor = 100);
+
+REINDEX INDEX derivation_inputs_pkey;
+REINDEX INDEX derivation_inputs_derivation_output_id_idx;
+REINDEX INDEX guix_revision_package_derivations_pkey;
+REINDEX INDEX derivations_pkey;
+REINDEX INDEX file_name_unique;
+REINDEX INDEX id_unique;
+REINDEX INDEX derivations_hash;
+REINDEX INDEX package_derivations_pkey;
+REINDEX INDEX package_derivations_id_key;
+REINDEX INDEX package_derivations_derivation_id;
+REINDEX INDEX package_derivations_package_id_idx;
+
+COMMIT;