diff --git a/src/backend/distributed/sql/citus--11.2-1--11.3-1.sql b/src/backend/distributed/sql/citus--11.2-1--11.3-1.sql index f30b57db6..8ba6739ce 100644 --- a/src/backend/distributed/sql/citus--11.2-1--11.3-1.sql +++ b/src/backend/distributed/sql/citus--11.2-1--11.3-1.sql @@ -46,4 +46,9 @@ WHERE shard.logicalrelid = shardgroup.logicalrelid shard.shardmaxvalue = shardgroup.shardmaxvalue OR ( shard.shardmaxvalue IS NULL AND shardgroup.shardmaxvalue IS NULL) - ); \ No newline at end of file + ); + +-- risky, but we want to fail quickly here. If there are cases where a shard is not associated correctly with a +-- shardgroup we would not want the setup to use the new Citus version as it hard relies on the shardgroups being +-- correctly associated. +ALTER TABLE pg_catalog.pg_dist_shard ALTER COLUMN shardgroupid SET NOT NULL;