From 0e3252f045739cdc5cf845bf9467ea47dfd9bd9a Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Mon, 24 Feb 2020 22:42:03 +0100 Subject: [PATCH 1/1] revert using stricter uniqueness constraint on place Multiple objects with the same (osm_type, osm_id, class) may exist when we hold back deleting an area because it is so large. Fixes #1695. --- sql/indices_updates.src.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/indices_updates.src.sql b/sql/indices_updates.src.sql index 99f59cdb..175bfba2 100644 --- a/sql/indices_updates.src.sql +++ b/sql/indices_updates.src.sql @@ -6,4 +6,4 @@ CREATE INDEX CONCURRENTLY idx_placex_pendingsector ON placex USING BTREE (rank_s CREATE INDEX CONCURRENTLY idx_location_area_country_place_id ON location_area_country USING BTREE (place_id) {ts:address-index}; DROP INDEX CONCURRENTLY IF EXISTS place_id_idx; -CREATE UNIQUE INDEX CONCURRENTLY idx_place_osm_unique on place using btree(osm_id,osm_type,class) {ts:address-index}; +CREATE UNIQUE INDEX CONCURRENTLY idx_place_osm_unique on place using btree(osm_id,osm_type,class,type) {ts:address-index}; -- 2.39.5