diff --git a/src/current/v26.1/alter-database.md b/src/current/v26.1/alter-database.md index be043a3d568..7bd7408e75c 100644 --- a/src/current/v26.1/alter-database.md +++ b/src/current/v26.1/alter-database.md @@ -866,6 +866,17 @@ The `lease_preferences` field is now updated to include `us-west1`. To remove the changes made in this example, [reset the Zone Config Extensions](#reset-a-regions-zone-config-extensions). +#### Reduce storage costs by removing non-voting replicas + +In a [multi-region database]({% link {{ page.version.version }}/multiregion-overview.md %}), the default zone configuration may include additional [non-voting replicas]({% link {{ page.version.version }}/configure-replication-zones.md %}#num_voters) (for example, to support [follower reads]({% link {{ page.version.version }}/follower-reads.md %})). The database's [survival goal]({% link {{ page.version.version }}/multiregion-overview.md %}#survival-goals) depends only on the number of voting replicas (`num_voters`), not the total number of replicas (`num_replicas`). + +If you want to reduce storage costs by removing non-voting replicas, you can use Zone Config Extensions to set `num_replicas` equal to `num_voters`: + +{% include_cached copy-clipboard.html %} +~~~ sql +ALTER DATABASE movr ALTER LOCALITY REGIONAL CONFIGURE ZONE USING num_replicas = 3; +~~~ + #### Implement super regions In this example, [Zone Config Extensions]({% link {{ page.version.version }}/zone-config-extensions.md %}) are used to provide an alternative implementation of [super regions]({% link {{ page.version.version }}/multiregion-overview.md %}#super-regions), which are useful for [data domiciling]({% link {{ page.version.version }}/data-domiciling.md %}). diff --git a/src/current/v26.1/zone-config-extensions.md b/src/current/v26.1/zone-config-extensions.md index 7e01f0076a3..ecdb86fe53e 100644 --- a/src/current/v26.1/zone-config-extensions.md +++ b/src/current/v26.1/zone-config-extensions.md @@ -24,6 +24,7 @@ We strongly recommend that most users use the [default multi-region SQL abstract - [`REGIONAL`]({% link {{ page.version.version }}/alter-database.md %}#parameters) extensions don't set [lease preferences]({% link {{ page.version.version }}/configure-replication-zones.md %}#lease_preferences). - [`REGIONAL IN`]({% link {{ page.version.version }}/alter-database.md %}#parameters) extensions don't set [lease preferences]({% link {{ page.version.version }}/configure-replication-zones.md %}#lease_preferences), nor do they set [replica constraints]({% link {{ page.version.version }}/configure-replication-zones.md %}#constraints) or [voter constraints]({% link {{ page.version.version }}/configure-replication-zones.md %}#voter_constraints) that would conflict with the original [home region]({% link {{ page.version.version }}/table-localities.md %}#regional-by-row-tables). - In no case will Zone Config Extensions change the [survival goals]({% link {{ page.version.version }}/multiregion-overview.md %}#survival-goals) for the database. + - Zone Config Extensions can set [`num_replicas`]({% link {{ page.version.version }}/configure-replication-zones.md %}#num_replicas) as low as [`num_voters`]({% link {{ page.version.version }}/configure-replication-zones.md %}#num_voters), which removes non-voting replicas while preserving the database's 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]({% link {{ page.version.version }}/alter-database.md %}#failover-regions). - They are region scoped. When a Zone Config Extension is attached to a [database region]({% link {{ page.version.version }}/multiregion-overview.md %}#database-regions), any [`REGIONAL BY TABLE`]({% link {{ page.version.version }}/table-localities.md %}#regional-tables) or [`REGIONAL BY ROW`]({% link {{ page.version.version }}/table-localities.md %}#regional-by-row-tables) tables associated with that region will have their zone configurations updated according to the settings passed via the extension. As mentioned above, this updated config will also be persisted in the face of other multi-region configuration changes. - They are locality scoped. You can specify a Zone Config Extension that only applies to tables with certain [localities]({% link {{ page.version.version }}/multiregion-overview.md %}#table-localities). For example, to apply a Zone Config Extension to tables with the [`GLOBAL` locality]({% link {{ page.version.version }}/table-localities.md %}#global-tables), use [`ALTER DATABASE ... ALTER LOCALITY GLOBAL ...`]({% link {{ page.version.version }}/alter-database.md %}#alter-locality).