Skip to content

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.

  • Remove the tiering policy from the assets_candlestick_daily hypertable:

    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);

The syntax is:

SELECT remove_tiering_policy(
hypertable = '<hypertable_or_cagg_name>',
if_exists = true | false
);
NameTypeDefaultRequiredDescription
hypertableREGCLASS-Name of the hypertable or continuous aggregate the tiering policy is attached to.
if_existsBOOLEANfalse-When true, emit a notice rather than an error if no tiering policy exists on the relation.

This function returns void.

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_exists is false.