guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: Change a package_descriptions index to use MD5 of


From: Christopher Baines
Subject: branch master updated: Change a package_descriptions index to use MD5 of the description
Date: Sun, 23 Aug 2020 09:42:49 -0400

This is an automated email from the git hooks/post-receive script.

cbaines pushed a commit to branch master
in repository data-service.

The following commit(s) were added to refs/heads/master by this push:
     new c7048ab  Change a package_descriptions index to use MD5 of the 
description
c7048ab is described below

commit c7048abe31dc4903343eb3d598363dc23c2a1e46
Author: Christopher Baines <mail@cbaines.net>
AuthorDate: Sun Aug 23 14:40:17 2020 +0100

    Change a package_descriptions index to use MD5 of the description
    
    To avoid the index data being too large.
    
    This was first seen in guix commit 1bb4fd64b7bbe5a17eda6f0ca8105283c038f7c8:
    
      psql-query-error (fatal-error PGRES_FATAL_ERROR ERROR: index row size 2808
      exceeds maximum 2712 for index 
"package_descriptions_locale_description_key"
      HINT: Values larger than 1/3 of a buffer page cannot be indexed.
---
 sqitch/deploy/change_package_descriptions_index.sql | 11 +++++++++++
 sqitch/revert/change_package_descriptions_index.sql |  7 +++++++
 sqitch/sqitch.plan                                  |  1 +
 sqitch/verify/change_package_descriptions_index.sql |  7 +++++++
 4 files changed, 26 insertions(+)

diff --git a/sqitch/deploy/change_package_descriptions_index.sql 
b/sqitch/deploy/change_package_descriptions_index.sql
new file mode 100644
index 0000000..da6b7f7
--- /dev/null
+++ b/sqitch/deploy/change_package_descriptions_index.sql
@@ -0,0 +1,11 @@
+-- Deploy guix-data-service:change_package_descriptions_index to pg
+
+BEGIN;
+
+ALTER TABLE package_descriptions DROP CONSTRAINT
+  package_descriptions_locale_description_key;
+
+CREATE UNIQUE INDEX package_descriptions_locale_description_key
+  ON package_descriptions USING btree (locale, MD5(description));
+
+COMMIT;
diff --git a/sqitch/revert/change_package_descriptions_index.sql 
b/sqitch/revert/change_package_descriptions_index.sql
new file mode 100644
index 0000000..2861580
--- /dev/null
+++ b/sqitch/revert/change_package_descriptions_index.sql
@@ -0,0 +1,7 @@
+-- Revert guix-data-service:change_package_descriptions_index from pg
+
+BEGIN;
+
+-- XXX Add DDLs here.
+
+COMMIT;
diff --git a/sqitch/sqitch.plan b/sqitch/sqitch.plan
index 5cfe31b..477f869 100644
--- a/sqitch/sqitch.plan
+++ b/sqitch/sqitch.plan
@@ -67,3 +67,4 @@ build_status_add_unique_index 2020-06-30T17:19:30Z 
Christopher Baines <mail@cbai
 builds_remove_build_server_id_derivation_unique_constraint 
2020-06-30T20:17:48Z Christopher Baines <mail@cbaines.net> # Allow multiple 
builds of the same derivation per build server
 derivation_output_details_sets_derivation_output_details_ids_index 
2020-07-04T07:56:49Z Christopher Baines <mail@cbaines.net> # Add GIN index on 
derivation_output_details_ids
 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
diff --git a/sqitch/verify/change_package_descriptions_index.sql 
b/sqitch/verify/change_package_descriptions_index.sql
new file mode 100644
index 0000000..3b6ec55
--- /dev/null
+++ b/sqitch/verify/change_package_descriptions_index.sql
@@ -0,0 +1,7 @@
+-- Verify guix-data-service:change_package_descriptions_index on pg
+
+BEGIN;
+
+-- XXX Add verifications here.
+
+ROLLBACK;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]