- 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 CONTINUOUS AGGREGATION
Function
Modifies a persistent aggregation that already exists in the current database.
Syntax Format
ALTER CONTINUOUS AGGREGATION [IF EXISTS] conagg_name action
where action is:
ALTER EVERY TO new_resample_interval
| ALTER START_OFFSET TO new_start_offset
| ALTER END_OFFSET TO new_end_offset
Parameter Description
-
conagg_name
The name of the continuous aggregation that needs to be modified, which may include a schema section.
Note: Specifying tablespace sections is not supported.
-
new_resample_interval
A new resampling interval for continuous aggregation.
Note: Modifying the resampling interval will take the current time + the new resampling interval and align it forward with the new resampling interval time unit as the next start time of the background task.
If the new resampling interval is '0s', the next start time of the continuous aggregation background task will be updated to 'infinity' (maximum value of timestamp type, which represents the pause start of the background task). And use the continuous aggregation original resample_time - original continuous aggregation resample interval + new continuous aggregation sample interval as the new resample_time for continuous aggregation.
-
new_start_offset
Continuously aggregates new sampling windows to start offsets.
-
new_end_offset
Continuously aggregates new sampling windows to end offsets.
Note: Only one parameter can be modified at a time, and the new parameter value must satisfy the constraints that were in place when the persistent aggregation was created.
Examples
Uqbar=# ALTER CONTINUOUS aggregation IF EXISTS weather_ca ALTER EVERY
TO '1 hour';
ALTER CONTINUOUS AGGREGATION