SHOW ZONE CONFIGURATIONS

Use the SHOW ZONE CONFIGURATIONS statement to view details about existing replication zones.

Synopsis

SHOWZONECONFIGURATIONFORRANGEzone_nameDATABASEdatabase_nameTABLEtable_namePARTITIONpartition_namePARTITIONpartition_nameOFTABLEtable_nameINDEXtable_name@index_nameCONFIGURATIONSALLZONECONFIGURATIONS

Required privileges

No privileges are required to list replication zones.

Parameters

ParameterDescription
range_nameThe name of the system range for which to show replication zone configurations.
database_nameThe name of the database for which to show replication zone configurations.
table_nameThe name of the table for which to show replication zone configurations.
partition_nameThe name of the partition for which to show replication zone configurations.
index_nameThe name of the index for which to show replication zone configurations.

Examples

View all replication zones

  1. > SHOW ALL ZONE CONFIGURATIONS;
  1. zone_name | config_sql
  2. +-------------+-----------------------------------------------------+
  3. .default | ALTER RANGE default CONFIGURE ZONE USING
  4. | range_min_bytes = 1048576,
  5. | range_max_bytes = 67108864,
  6. | gc.ttlseconds = 90000,
  7. | num_replicas = 3,
  8. | constraints = '[]',
  9. | lease_preferences = '[]'
  10. system | ALTER DATABASE system CONFIGURE ZONE USING
  11. | range_min_bytes = 1048576,
  12. | range_max_bytes = 67108864,
  13. | gc.ttlseconds = 90000,
  14. | num_replicas = 5,
  15. | constraints = '[]',
  16. | lease_preferences = '[]'
  17. system.jobs | ALTER TABLE system.public.jobs CONFIGURE ZONE USING
  18. | range_min_bytes = 1048576,
  19. | range_max_bytes = 67108864,
  20. | gc.ttlseconds = 600,
  21. | num_replicas = 5,
  22. | constraints = '[]',
  23. | lease_preferences = '[]'
  24. .meta | ALTER RANGE meta CONFIGURE ZONE USING
  25. | range_min_bytes = 1048576,
  26. | range_max_bytes = 67108864,
  27. | gc.ttlseconds = 3600,
  28. | num_replicas = 5,
  29. | constraints = '[]',
  30. | lease_preferences = '[]'
  31. .system | ALTER RANGE system CONFIGURE ZONE USING
  32. | range_min_bytes = 1048576,
  33. | range_max_bytes = 67108864,
  34. | gc.ttlseconds = 90000,
  35. | num_replicas = 5,
  36. | constraints = '[]',
  37. | lease_preferences = '[]'
  38. .liveness | ALTER RANGE liveness CONFIGURE ZONE USING
  39. | range_min_bytes = 1048576,
  40. | range_max_bytes = 67108864,
  41. | gc.ttlseconds = 600,
  42. | num_replicas = 5,
  43. | constraints = '[]',
  44. | lease_preferences = '[]'
  45. (6 rows)

View the default replication zone for the cluster

  1. > SHOW ZONE CONFIGURATION FOR RANGE default;
  1. zone_name | config_sql
  2. +-----------+------------------------------------------+
  3. .default | ALTER RANGE default CONFIGURE ZONE USING
  4. | range_min_bytes = 1048576,
  5. | range_max_bytes = 67108864,
  6. | gc.ttlseconds = 90000,
  7. | num_replicas = 3,
  8. | constraints = '[]',
  9. | lease_preferences = '[]'
  10. (1 row)

View the replication zone for a database

  1. > SHOW ZONE CONFIGURATION FOR DATABASE tpch;
  1. zone_name | config_sql
  2. +-----------+------------------------------------------+
  3. tpch | ALTER DATABASE tpch CONFIGURE ZONE USING
  4. | range_min_bytes = 1048576,
  5. | range_max_bytes = 67108864,
  6. | gc.ttlseconds = 90000,
  7. | num_replicas = 3,
  8. | constraints = '[]',
  9. | lease_preferences = '[]'
  10. (1 row)

View the replication zone for a table

  1. > SHOW ZONE CONFIGURATION FOR TABLE tpch.customer;
  1. zone_name | config_sql
  2. +---------------+-------------------------------------------------------+
  3. tpch.customer | ALTER TABLE tpch.public.customer CONFIGURE ZONE USING
  4. | range_min_bytes = 40000,
  5. | range_max_bytes = 67108864,
  6. | gc.ttlseconds = 90000,
  7. | num_replicas = 3,
  8. | constraints = '[]',
  9. | lease_preferences = '[]'
  10. (1 row)

View the replication zone for an index

  1. > SHOW ZONE CONFIGURATION FOR INDEX tpch.customer@frequent_customers;
  1. zone_name | config_sql
  2. +---------------+-------------------------------------------------------+
  3. tpch.customer | ALTER TABLE tpch.public.customer CONFIGURE ZONE USING
  4. | range_min_bytes = 40000,
  5. | range_max_bytes = 67108864,
  6. | gc.ttlseconds = 90000,
  7. | num_replicas = 3,
  8. | constraints = '[]',
  9. | lease_preferences = '[]'
  10. (1 row)

View the replication zone for a table partition

  1. > SHOW ZONE CONFIGURATION FOR PARTITION north_america OF TABLE roachlearn.students;
  1. zone_name | config_sql
  2. +-----------------------------------+------------------------------------------------------------------------------------------------+
  3. roachlearn.students.north_america | ALTER PARTITION north_america OF INDEX roachlearn.public.students@primary CONFIGURE ZONE USING
  4. | range_min_bytes = 16777216,
  5. | range_max_bytes = 67108864,
  6. | gc.ttlseconds = 90000,
  7. | num_replicas = 3,
  8. | constraints = '[+region=us]',
  9. | lease_preferences = '[]'

See also

Was this page helpful?
YesNo