Skip to content

Commit 0f73bd5

Browse files
committed
Drop job_errors view in bgw_job_stat_history migration
The 2.28.0--2.28.1 migration rebuilds bgw_job_stat_history to fix a wrong id column type. It dropped the job_history view before rebuilding the table but not the job_errors view, which also reads from that table. On upgrade paths that start at or below 2.24.0 the views are not detached first, so job_errors still depends on the table and the DROP TABLE fails. The view must also be dropped so it can be recreated with the corrected column types afterwards. Fixes #10272
1 parent 5d11033 commit 0f73bd5

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

sql/updates/2.28.0--2.28.1.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ BEGIN
99
-- START bgw_job_stat_history
1010
--
1111
DROP VIEW IF EXISTS timescaledb_information.job_history;
12+
DROP VIEW IF EXISTS timescaledb_information.job_errors;
1213

1314
CREATE TABLE _timescaledb_internal._tmp_bgw_job_stat_history AS SELECT * FROM _timescaledb_internal.bgw_job_stat_history;
1415
CREATE TABLE _timescaledb_internal._tmp_job_stat_history_id_seq AS SELECT last_value, is_called FROM _timescaledb_internal.bgw_job_stat_history_id_seq;

0 commit comments

Comments
 (0)