mirror of
https://github.com/timescale/timescaledb.git
synced 2025-05-16 02:23:49 +08:00
Add ignore_invalidation_older_than to view
Add ignore_invalidation_older_than parameter to timescaledb_information.continuous_aggregates view Fixes #1664
This commit is contained in:
parent
4dc0693d1f
commit
a2629cbff2
13
CHANGELOG.md
13
CHANGELOG.md
@ -4,6 +4,19 @@
|
||||
`psql` with the `-X` flag to prevent any `.psqlrc` commands from
|
||||
accidentally triggering the load of a previous DB version.**
|
||||
|
||||
## latest
|
||||
|
||||
**Major Features**
|
||||
|
||||
**Minor Features**
|
||||
|
||||
**Bugfixes**
|
||||
* #1648 Drop chunks for materialized hypertable
|
||||
* #1665 Add ignore_invalidation_older_than to timescaledb_information.continuous_aggregates view
|
||||
|
||||
**Thanks**
|
||||
* @RJPhillips01 for reporting an issue with drop chunks.
|
||||
|
||||
## 1.6.0 (2020-01-14)
|
||||
|
||||
This release adds major new features and bugfixes since the 1.5.1 release.
|
||||
|
@ -0,0 +1 @@
|
||||
DROP VIEW IF EXISTS timescaledb_information.continuous_aggregates;
|
@ -100,6 +100,15 @@ CREATE OR REPLACE VIEW timescaledb_information.continuous_aggregates as
|
||||
THEN _timescaledb_internal.to_interval(cagg.max_interval_per_job)::TEXT
|
||||
ELSE cagg.max_interval_per_job::TEXT
|
||||
END AS max_interval_per_job,
|
||||
CASE _timescaledb_internal.get_time_type(cagg.raw_hypertable_id)
|
||||
WHEN 'TIMESTAMP'::regtype
|
||||
THEN _timescaledb_internal.to_interval(cagg.ignore_invalidation_older_than)::TEXT
|
||||
WHEN 'TIMESTAMPTZ'::regtype
|
||||
THEN _timescaledb_internal.to_interval(cagg.ignore_invalidation_older_than)::TEXT
|
||||
WHEN 'DATE'::regtype
|
||||
THEN _timescaledb_internal.to_interval(cagg.ignore_invalidation_older_than)::TEXT
|
||||
ELSE cagg.ignore_invalidation_older_than::TEXT
|
||||
END AS ignore_invalidation_older_than,
|
||||
format('%1$I.%2$I', ht.schema_name, ht.table_name)::regclass as materialization_hypertable,
|
||||
directview.viewdefinition as view_definition
|
||||
FROM _timescaledb_catalog.continuous_agg cagg,
|
||||
|
@ -76,19 +76,20 @@ SELECT * FROM device_summary WHERE metric_spread = 1800 ORDER BY bucket DESC, de
|
||||
--You can view informaton about your continuous aggregates. The meaning of these fields will be explained further down.
|
||||
\x
|
||||
SELECT * FROM timescaledb_information.continuous_aggregates;
|
||||
-[ RECORD 1 ]--------------+-------------------------------------------------------------------------------------------------------------
|
||||
view_name | device_summary
|
||||
view_owner | default_perm_user
|
||||
refresh_lag | @ 2 hours
|
||||
refresh_interval | @ 2 hours
|
||||
max_interval_per_job | @ 60 days
|
||||
materialization_hypertable | _timescaledb_internal._materialized_hypertable_2
|
||||
view_definition | SELECT time_bucket('@ 1 hour'::interval, device_readings.observation_time) AS bucket, +
|
||||
| device_readings.device_id, +
|
||||
| avg(device_readings.metric) AS metric_avg, +
|
||||
| (max(device_readings.metric) - min(device_readings.metric)) AS metric_spread +
|
||||
| FROM device_readings +
|
||||
| GROUP BY (time_bucket('@ 1 hour'::interval, device_readings.observation_time)), device_readings.device_id;
|
||||
-[ RECORD 1 ]------------------+-------------------------------------------------------------------------------------------------------------
|
||||
view_name | device_summary
|
||||
view_owner | default_perm_user
|
||||
refresh_lag | @ 2 hours
|
||||
refresh_interval | @ 2 hours
|
||||
max_interval_per_job | @ 60 days
|
||||
ignore_invalidation_older_than | @ 106751991 days 4 hours 54.775807 secs
|
||||
materialization_hypertable | _timescaledb_internal._materialized_hypertable_2
|
||||
view_definition | SELECT time_bucket('@ 1 hour'::interval, device_readings.observation_time) AS bucket, +
|
||||
| device_readings.device_id, +
|
||||
| avg(device_readings.metric) AS metric_avg, +
|
||||
| (max(device_readings.metric) - min(device_readings.metric)) AS metric_spread +
|
||||
| FROM device_readings +
|
||||
| GROUP BY (time_bucket('@ 1 hour'::interval, device_readings.observation_time)), device_readings.device_id;
|
||||
|
||||
--You can also view information about your background workers.
|
||||
--Note: (some fields are empty because there are no background workers used in tests)
|
||||
|
Loading…
x
Reference in New Issue
Block a user