remove_tiering_policy()
Remove the tiering policy from a hypertable or continuous aggregate
Remove the tiering policy from a hypertable or continuous aggregate. The underlying Tiger Cloud background job is deleted, so no further chunks are tiered automatically.
Chunks that the policy had already frozen and queued for upload but had not yet shipped to object storage are unfrozen and removed from the tiering queue. Chunks that have already been uploaded to object storage remain tiered; use untier_chunk to bring them back.
Samples
Section titled “Samples”-
Remove the tiering policy from the
assets_candlestick_dailyhypertable:SELECT remove_tiering_policy('assets_candlestick_daily'); -
Remove the tiering policy from a continuous aggregate, ignoring the call when no policy exists:
SELECT remove_tiering_policy('daily_summary', if_exists => true);
Arguments
Section titled “Arguments”The syntax is:
SELECT remove_tiering_policy( hypertable = '<hypertable_or_cagg_name>', if_exists = true | false);| Name | Type | Default | Required | Description |
|---|---|---|---|---|
hypertable | REGCLASS | - | ✔ | Name of the hypertable or continuous aggregate the tiering policy is attached to. |
if_exists | BOOLEAN | false | - | When true, emit a notice rather than an error if no tiering policy exists on the relation. |
Returns
Section titled “Returns”This function returns void.
Errors
Section titled “Errors”remove_tiering_policy raises an exception when:
- The supplied relation is neither a hypertable nor a continuous aggregate.
- No tiering policy exists on the relation and
if_existsisfalse.