ALTER DATABASE ... ALTER LOCALITY statement.
Use cases for Zone Config Extensions include:
- Failover behavior
- Regions with stale read access
- Quorum placement
- Data domiciling
- Zone Config Extensions are persistent and kept up-to-date. Unlike raw zone config modification, which must be fully overwritten on each multi-region configuration change in order to take effect, Zone Config Extensions stay in place alongside the high-level multi-region SQL configuration. This is true even if you add new tables or regions, or if a table’s locality is changed.
- They are validated against the configs already in place in a multi-region cluster. Unlike hand-written zone configs, they are designed to work properly with the configuration generated by the higher-level multi-region SQL statements. Specifically, this means:
REGIONALextensions don’t set lease preferences.REGIONAL INextensions don’t set lease preferences, nor do they set replica constraints or voter constraints that would conflict with the original home region.SUPER REGIONextensions don’t set lease preferences. Region constraints in their replica constraints and voter constraints can reference only regions that belong to the super region.- Zone Config Extensions don’t change the survival goals for the database or its super regions.
- Zone Config Extensions can set
num_replicasas low asnum_voters, which removes non-voting replicas and can reduce infrastructure costs while preserving the applicable survival goal.
- They are composable. You can use Zone Config Extensions to build up approximations of many higher-level features. For an example, see Failover regions.
- They can be region or super-region scoped. A region extension updates the zone configurations of
REGIONAL BY TABLEtables andREGIONAL BY ROWpartitions associated with that region. A super-region extension updates those objects when their home region belongs to the super region. Super-region extensions don’t apply toGLOBALtables. - They are locality scoped. You can specify a Zone Config Extension that only applies to tables with certain localities. For example, to apply a Zone Config Extension to tables with the
GLOBALlocality, useALTER DATABASE ... ALTER LOCALITY GLOBAL ....
Zone Config Extensions are a property of a database region, not any particular schema object. This differs from raw zone configurations, which may need to be assigned (and reassigned) to 10s or 100s of different schema objects on every configuration change.
REGIONAL extensions first, SUPER REGION extensions second, and REGIONAL IN extensions last. More-specific settings therefore override the same fields from less-specific extensions.

