Skip to content

sql: after restore with skip_localities its not possible to change primary regions #103290

@fqazi

Description

@fqazi

In 22.2 we added extra validation for region configs, which made (#100913) the skip_localities options problematic if the primary region of the database being restored no longer exists. While this option will correctly skip the validation of regions for databases, there is no real path for actually fixing the region anymore, since the same validation blocks alter commands. Our options are to either:

  1. Have restore completely wipe / re-configure the multi-region properties of a database
  2. Allow ALTER DATABASE SET PRIMARY REGION to work within a transaction to fix this issue
  3. Have a temporary bypass via a session variable to disable validation for this use case

Jira issue: CRDB-27925

Epic CRDB-27601

Metadata

Metadata

Assignees

Labels

C-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.T-sql-foundationsSQL Foundations Team (formerly SQL Schema + SQL Sessions)v23.1.2

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions