sql: block on transition to multi-region if tables have custom zone configs #63071
Labels
C-bug
Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.
GA-blocker
Address this TODO:
cockroach/pkg/sql/alter_database.go
Line 759 in fddcc70
When attempting to transition an existing database to multi-region, we’d like to block the transition if any existing tables within the database have custom
constraints
,voter_constraints
,num_replicas
,num_voters
orlease_preferences
defined. We expect the user toDISCARD
these existing configs before they can add their initial primary region.Without the above, we risk clobbering the individual tables’ zone configs upon the transition, as they may not inherit attributes that, for instance, control the survivability or attributes that dictate the placement of non-voting replicas.
Lastly, we might want to permit the user to force their way into this transition if they have the
override_multi_region_zone_config
session variable set totrue
.To reproduce:
The text was updated successfully, but these errors were encountered: