Back to Materialize

DROP CLUSTER REPLICA

doc/user/content/sql/drop-cluster-replica.md

1231.4 KB
Original Source

DROP CLUSTER REPLICA deprovisions an existing replica of the specified unmanaged cluster. To remove the cluster itself, use the DROP CLUSTER command.

{{< tip >}} When getting started with Materialize, we recommend starting with managed clusters. {{</ tip >}}

Syntax

mzsql
DROP CLUSTER REPLICA [IF EXISTS] <cluster_name>.<replica_name>;
Syntax elementDescription
IF EXISTSOptional. If specified, do not return an error if the specified cluster replica does not exist.
<cluster_name>The cluster you want to remove a replica from. For available clusters, see SHOW CLUSTERS.
<replica_name>The cluster replica you want to drop. For available cluster replicas, see SHOW CLUSTER REPLICAS.

Examples

mzsql
SHOW CLUSTER REPLICAS WHERE cluster = 'auction_house';
nofmt
    cluster    | replica
---------------+---------
 auction_house | bigger
mzsql
DROP CLUSTER REPLICA auction_house.bigger;

Privileges

The privileges required to execute this statement are:

{{% include-headless "/headless/sql-command-privileges/drop-cluster-replica" %}}