ALTER CLUSTER
ALTER CLUSTER
changes the configuration of a cluster. To rename a
cluster, use ALTER ... RENAME
.
Syntax
Field | Value | Description |
---|---|---|
SIZE |
text |
The size of the resource allocations for the cluster. See Size for details. |
REPLICATION FACTOR |
text |
The number of replicas to provision for the cluster. See Replication factor for details. Default: 1 |
INTROSPECTION INTERVAL |
interval |
The interval at which to collect introspection data. See Troubleshooting for details about introspection data. The special value 0 entirely disables the gathering of introspection data.Default: 1s |
INTROSPECTION DEBUGGING |
bool |
Indicates whether to introspect the gathering of the introspection data. Default: FALSE |
IDLE ARRANGEMENT MERGE EFFORT |
integer |
Unstable. This option may be changed or removed at any time. The amount of effort the replica should exert on compacting arrangements during idle periods. |
DISK |
bool |
Private preview. This option has known performance or stability issues and is under active development. Whether to attach a disk to the cluster. See Disk for details. Default: FALSE |
MANAGED |
bool |
Whether to automatically manage the cluster’s replicas based on the configured size and replication factor. If FALSE , enables the use of the deprecated CREATE CLUSTER REPLICA command.Default: TRUE |
Examples
Replication factor
Alter cluster to two replicas:
ALTER CLUSTER c1 SET (REPLICATION FACTOR 2);
Size
Alter cluster to size xsmall
:
ALTER CLUSTER c1 SET (SIZE 'xsmall');
Converting unmanaged to managed clusters
WARNING!
Unmanaged clusters are a deprecated feature of Materialize that required manual management of cluster replicas.
We recommend converting any unmanaged clusters to managed clusters by following the instructions below.
Alter the managed
status of a cluster to managed:
ALTER CLUSTER c1 SET (MANAGED);
Materialize permits converting an unmanged cluster to a managed cluster if the following conditions are met:
- The cluster replica names are
r1
,r2
, …,rN
. - All replicas have the same size.
- If there are no replicas,
SIZE
needs to be specified. - If specified, the replication factor must match the number of replicas.
Note that the cluster will not have settings for the availability zones, and compute-specific settings. If needed, these can be set explicitly.
Privileges
The privileges required to execute this statement are:
- Ownership of the cluster.