Sign InTry Free

ALTER RANGE

Currently, the ALTER RANGE statement can only be used to modify the range of a specific placement policy in TiDB.

Synopsis

AlterRangeStmt
ALTERRANGEIdentifierPlacementPolicyOption

ALTER RANGE supports the following two parameters:

  • global: indicates the range of all data in a cluster.
  • meta: indicates the range of internal metadata stored in TiDB.

Examples

CREATE PLACEMENT POLICY `deploy111` CONSTRAINTS='{"+region=us-east-1":1, "+region=us-east-2": 1, "+region=us-west-1": 1}'; CREATE PLACEMENT POLICY `five_replicas` FOLLOWERS=4; ALTER RANGE global PLACEMENT POLICY = "deploy111"; ALTER RANGE meta PLACEMENT POLICY = "five_replicas";

The preceding example creates two placement policies (deploy111 and five_replicas), specifies constraints for different regions, and then applies the deploy111 placement policy to all data in the cluster range and the five_replicas placement policy to the metadata range.

Was this page helpful?

Download PDFRequest docs changesAsk questions on Discord
Playground
New
One-stop & interactive experience of TiDB's capabilities WITHOUT registration.
Products
TiDB
TiDB Dedicated
TiDB Serverless
Pricing
Get Demo
Get Started
© 2024 PingCAP. All Rights Reserved.
Privacy Policy.