timescaledb_experimental.policies

The policies view provides information on all policies set on continuous aggregates.

note

Only policies applying to continuous aggregates are shown in this view. Policies applying to regular hypertables or regular materialized views are not displayed.

warning

Experimental features could have bugs. They might not be backwards compatible, and could be removed in future releases. Use these features at your own risk, and do not use any experimental features in production.

Available columns

Column Type Description
relation_name Name of the continuous aggregate
relation_schema Schema of the continuous aggregate
schedule_interval How often the policy job runs
proc_schema Schema of the policy job
proc_name Name of the policy job
config Configuration details for the policy job
hypertable_schema Schema of the hypertable that contains the actual data for the continuous aggregate view
hypertable_name Name of the hypertable that contains the actual data for the continuous aggregate view

Sample usage

Select from the timescaledb_experimental.policies table to view it:

2. SELECT * FROM timescaledb_experimental.policies;

Example of the returned output:

2. -[ RECORD 1 ]--------------------------------------------------------------------

4. relation_name     | mat_m1

6. relation_schema   | public

8. schedule_interval | @ 1 hour

10. proc_schema       | _timescaledb_internal

12. proc_name         | policy_refresh_continuous_aggregate

14. config            | {"end_offset": 1, "start_offset", 10, "mat_hypertable_id": 2}

16. hypertable_schema | _timescaledb_internal

18. hypertable_name   | _materialized_hypertable_2

20. -[ RECORD 2 ]--------------------------------------------------------------------

22. relation_name     | mat_m1

24. relation_schema   | public

26. schedule_interval | @ 1 day

28. proc_schema       | _timescaledb_internal

30. proc_name         | policy_compression

32. config            | {"hypertable_id": 2, "compress_after", 11}

34. hypertable_schema | _timescaledb_internal

36. hypertable_name   | _materialized_hypertable_2

38. -[ RECORD 3 ]--------------------------------------------------------------------

40. relation_name     | mat_m1

42. relation_schema   | public

44. schedule_interval | @ 1 day

46. proc_schema       | _timescaledb_internal

48. proc_name         | policy_retention

50. config            | {"drop_after": 20, "hypertable_id": 2}

52. hypertable_schema | _timescaledb_internal

54. hypertable_name   | _materialized_hypertable_2