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

Synopsis

SHOW ZONE CONFIGURATION FOR RANGE zone_name DATABASE database_name TABLE table_name PARTITION partition_name PARTITION partition_name OF TABLE table_name INDEX table_name @ index_name CONFIGURATIONS ALL ZONE CONFIGURATIONS

Required privileges

No privileges are required to list replication zones.

Parameters

Parameter Description
range_name The name of the system range for which to show replication zone configurations.
database_name The name of the database for which to show replication zone configurations.
table_name The name of the table for which to show replication zone configurations.
partition_name The name of the partition for which to show replication zone configurations.
index_name The name of the index for which to show replication zone configurations.

Examples

View all replication zones

copy
icon/buttons/copy
> SHOW ALL ZONE CONFIGURATIONS;
   zone_name  |                     config_sql
+-------------+-----------------------------------------------------+
  .default    | ALTER RANGE default CONFIGURE ZONE USING
              |     range_min_bytes = 1048576,
              |     range_max_bytes = 67108864,
              |     gc.ttlseconds = 90000,
              |     num_replicas = 3,
              |     constraints = '[]',
              |     lease_preferences = '[]'
  system      | ALTER DATABASE system CONFIGURE ZONE USING
              |     range_min_bytes = 1048576,
              |     range_max_bytes = 67108864,
              |     gc.ttlseconds = 90000,
              |     num_replicas = 5,
              |     constraints = '[]',
              |     lease_preferences = '[]'
  system.jobs | ALTER TABLE system.public.jobs CONFIGURE ZONE USING
              |     range_min_bytes = 1048576,
              |     range_max_bytes = 67108864,
              |     gc.ttlseconds = 600,
              |     num_replicas = 5,
              |     constraints = '[]',
              |     lease_preferences = '[]'
  .meta       | ALTER RANGE meta CONFIGURE ZONE USING
              |     range_min_bytes = 1048576,
              |     range_max_bytes = 67108864,
              |     gc.ttlseconds = 3600,
              |     num_replicas = 5,
              |     constraints = '[]',
              |     lease_preferences = '[]'
  .system     | ALTER RANGE system CONFIGURE ZONE USING
              |     range_min_bytes = 1048576,
              |     range_max_bytes = 67108864,
              |     gc.ttlseconds = 90000,
              |     num_replicas = 5,
              |     constraints = '[]',
              |     lease_preferences = '[]'
  .liveness   | ALTER RANGE liveness CONFIGURE ZONE USING
              |     range_min_bytes = 1048576,
              |     range_max_bytes = 67108864,
              |     gc.ttlseconds = 600,
              |     num_replicas = 5,
              |     constraints = '[]',
              |     lease_preferences = '[]'
(6 rows)

View the default replication zone for the cluster

copy
icon/buttons/copy
> SHOW ZONE CONFIGURATION FOR RANGE default;
  zone_name |                config_sql
+-----------+------------------------------------------+
  .default  | ALTER RANGE default CONFIGURE ZONE USING
            |     range_min_bytes = 1048576,
            |     range_max_bytes = 67108864,
            |     gc.ttlseconds = 90000,
            |     num_replicas = 3,
            |     constraints = '[]',
            |     lease_preferences = '[]'
(1 row)

View the replication zone for a database

copy
icon/buttons/copy
> SHOW ZONE CONFIGURATION FOR DATABASE tpch;
  zone_name |                config_sql
+-----------+------------------------------------------+
  tpch      | ALTER DATABASE tpch CONFIGURE ZONE USING
            |     range_min_bytes = 1048576,
            |     range_max_bytes = 67108864,
            |     gc.ttlseconds = 90000,
            |     num_replicas = 3,
            |     constraints = '[]',
            |     lease_preferences = '[]'
(1 row)

View the replication zone for a table

copy
icon/buttons/copy
> SHOW ZONE CONFIGURATION FOR TABLE tpch.customer;
    zone_name   |                      config_sql
+---------------+-------------------------------------------------------+
  tpch.customer | ALTER TABLE tpch.public.customer CONFIGURE ZONE USING
                |     range_min_bytes = 40000,
                |     range_max_bytes = 67108864,
                |     gc.ttlseconds = 90000,
                |     num_replicas = 3,
                |     constraints = '[]',
                |     lease_preferences = '[]'
(1 row)

View the replication zone for an index

copy
icon/buttons/copy
> SHOW ZONE CONFIGURATION FOR INDEX tpch.customer@frequent_customers;
    zone_name   |                      config_sql
+---------------+-------------------------------------------------------+
  tpch.customer | ALTER TABLE tpch.public.customer CONFIGURE ZONE USING
                |     range_min_bytes = 40000,
                |     range_max_bytes = 67108864,
                |     gc.ttlseconds = 90000,
                |     num_replicas = 3,
                |     constraints = '[]',
                |     lease_preferences = '[]'
(1 row)

View the replication zone for a table partition

copy
icon/buttons/copy
> SHOW ZONE CONFIGURATION FOR PARTITION north_america OF TABLE roachlearn.students;
              zone_name             |                                           config_sql
+-----------------------------------+------------------------------------------------------------------------------------------------+
  roachlearn.students.north_america | ALTER PARTITION north_america OF INDEX roachlearn.public.students@primary CONFIGURE ZONE USING
                                    |     range_min_bytes = 16777216,
                                    |     range_max_bytes = 67108864,
                                    |     gc.ttlseconds = 90000,
                                    |     num_replicas = 3,
                                    |     constraints = '[+region=us]',
                                    |     lease_preferences = '[]'

See also



Yes No