Skip to main content

ALTER STORAGE POLICY

Note:

Storage policies describe self-managed local-to-remote tiering. They do not configure warehouse object storage or cluster caches in VeloDB Cloud. See storage layout for the Cloud storage model. The statement syntax is retained for compatibility reference.

Description​

This statement is used to modify an existing hot-cold tiered migration policy. Only root or admin users can modify resources.

Syntax​

ALTER STORAGE POLICY '<policy_name>' PROPERTIES ("<key>"="<value>"[, ... ]);

Required parameters​

1.<policy_name>

The name of the storage policy. This is the unique identifier of the storage policy you want to modify, and an existing policy name must be specified.

Optional parameters​

PROPERTIES ("<key>"="<value>"[, ... ])

1.retention_days

Data retention period. Defines the duration for which the data is kept in storage. Data exceeding this period will be automatically deleted.

2.redundancy_level

Redundancy level. Defines the number of data replicas to ensure high availability and fault tolerance. For example, a value of 2 means each data block has two replicas.

3.storage_type

Storage type. Specifies the storage medium used, such as SSD, HDD, or hybrid storage. This affects performance and cost.

4.cooloff_time

Cool-off time. The time interval between when data is marked for deletion and when it is actually deleted. This helps prevent data loss due to accidental operations.

5.location_policy

Geographical location policy. Defines the geographical placement of data, such as cross-region replication for disaster recovery.

Examples​

  1. Modify the cooldown_datetime for hot-cold tiered data migration:
ALTER STORAGE POLICY has_test_policy_to_alter PROPERTIES("cooldown_datetime" = "2023-06-08 00:00:00");
  1. Modify the cooldown_ttl for hot-cold tiered data migration countdown:
ALTER STORAGE POLICY has_test_policy_to_alter PROPERTIES ("cooldown_ttl" = "10000");
ALTER STORAGE POLICY has_test_policy_to_alter PROPERTIES ("cooldown_ttl" = "1h");
ALTER STORAGE POLICY has_test_policy_to_alter PROPERTIES ("cooldown_ttl" = "3d");

Ask AI