Rima
Rima

Reputation: 61

How do you configure the number of replicas per table or database?

On Cockroachdb, is it possible to configure the number of replicas per table or database?

Upvotes: 2

Views: 146

Answers (1)

Rima
Rima

Reputation: 61

Yes. You can use the CONFIGURE ZONE subcommand to do so. For a database, you can configure your replicas using ALTER DATABASE <db> CONFIGURE ZONE USING num_replicas=<number>. For table, it would be same as above except replace DATABASE keyword with the TABLE keyword. You can view your replication zone setup using the SHOW ZONE CONFIGURATIONS query. Please refer to the docs for more information: https://www.cockroachlabs.com/docs/stable/configure-zone.html

Upvotes: 3

Related Questions