v2.0
- About Uqbar
- Release Note
- Uqbar Installation
- Uqbar Management
- Data Retention Policy
- Time-Series Table Management
- Time-Series Data Write
- Data Compression
- Data Deletion
- Data Query
- Continuous Aggregation
- Time-Series Views
- Cluster Management
- Backup and Restoration
- Security
- GUC Parameters
- SQL Syntax
- Third Party Tools Support
- Glossary
ALTER TIMESERIES POLICY
Function
For modifying existing data retention policies.
Precautions
- The modified duration and chunkGroupDuration must meet the constraints of the new data retention policy.
Syntax Format
ALTER TIMESERIES POLICY [IF EXISTS] policy_name actions
action
includes:
- RENAME TO policy_name, used to modify the data retention policy name, where policy_name is used to specify the modified policy name.
- SET ( option = value, [...] ) , used to modify the data retention policy parameters.
- DEFAULT, used to set the default policy.
option
includes:
- { duration, chunkGroupDuration }
Examples
Uqbar=# ALTER TIMESERIES POLICY policy_test SET( chunkGroupDuration='1 month');
ALTER POLICY
Uqbar=# ALTER TIMESERIES POLICY policy_test RENAME TO policy_1;
ALTER POLICY
Uqbar=# ALTER TIMESERIES POLICY policy1 DEFAULT;
ALTER TIMESERIES POLICY