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.
11 lines
313 B
PL/PgSQL
11 lines
313 B
PL/PgSQL
-- 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;
|