Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add jobs to timescaledb_information.policy_stats #1608

Merged
merged 1 commit into from Jan 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -24,6 +24,7 @@ that a backfill can trigger. By default, all invalidations are processed.
* #1591 Fix locf treat_null_as_missing option
* #1594 Fix error in compression constraint check
* #1607 Delete compression policy when drop hypertable
* #1608 Add jobs to timescaledb_information.policy_stats

**Thanks**
* @optijon for reporting an issue with locf treat_null_as_missing option
Expand Down
4 changes: 3 additions & 1 deletion sql/views.sql
Expand Up @@ -69,7 +69,9 @@ CREATE OR REPLACE VIEW timescaledb_information.policy_stats as
SELECT format('%1$I.%2$I', ht.schema_name, ht.table_name)::regclass as hypertable, p.job_id, j.job_type, js.last_run_success, js.last_finish, js.last_successful_finish, js.last_start, js.next_start,
js.total_runs, js.total_failures
FROM (SELECT job_id, hypertable_id FROM _timescaledb_config.bgw_policy_reorder
UNION SELECT job_id, hypertable_id FROM _timescaledb_config.bgw_policy_drop_chunks) p
UNION SELECT job_id, hypertable_id FROM _timescaledb_config.bgw_policy_drop_chunks
UNION SELECT job_id, hypertable_id FROM _timescaledb_config.bgw_policy_compress_chunks
UNION SELECT job_id, raw_hypertable_id FROM _timescaledb_catalog.continuous_agg) p
INNER JOIN _timescaledb_catalog.hypertable ht ON p.hypertable_id = ht.id
INNER JOIN _timescaledb_config.bgw_job j ON p.job_id = j.id
INNER JOIN _timescaledb_internal.bgw_job_stat js on p.job_id = js.job_id
Expand Down