Skip to main content
This feature is in and subject to change. To share feedback and/or issues, contact Support.
The SHOW VIRTUAL CLUSTER statement lists all virtual clusters running in a CockroachDB cluster. SHOW VIRTUAL CLUSTER supports inspecting virtual cluster status only as part of the workflow. PCR happens between an active primary cluster and a passive standby cluster that accepts updates from the primary cluster. The unit of replication is a virtual cluster, which is part of the underlying infrastructure in the primary and standby clusters. The CockroachDB cluster has:
  • The system virtual cluster manages the cluster’s control plane and the replication of the cluster’s data. Admins connect to the system virtual cluster to configure and manage the underlying CockroachDB cluster, set up PCR, create and manage a virtual cluster, and observe metrics and logs for the CockroachDB cluster and each virtual cluster.
  • The application virtual cluster manages the cluster’s data plane. Application virtual clusters contain user data and run application workloads.
For more detail, refer to the .

Required privileges

SHOW VIRTUAL CLUSTER requires either:
  • The admin role.
  • The MANAGEVIRTUALCLUSTER .
Use the statement:

Synopsis

xml version=“1.0” encoding=“UTF-8”?

Parameters

Responses

This table lists all possible responses from the different SHOW VIRTUAL CLUSTER statements:
To find the job ID for the replication stream, use the statement. For example:

Data state

The data_state and status fields show the current state of a virtual cluster’s data and progress of the replication stream job.

Examples

Show all virtual clusters

List all virtual clusters:

Show a virtual cluster

To show more details about the main virtual cluster:

Show replication status

To show the replication status of all virtual clusters:
To show the replication status of the main virtual cluster:

See also