mirror of
https://github.com/timescale/timescaledb.git
synced 2025-05-19 20:24:46 +08:00
Remove the refresh step from CAgg migration
We're facing some weird `portal snapshot` issues running the `refresh_continuous_aggregate` procedure called from other procedures. Fixed it by ignoring the Refresh Continuous Aggregate step from the `cagg_migrate` and warning users to run it manually after the execution. Fixes #4913
This commit is contained in:
parent
7bc6e56cb7
commit
e84a6e2e65
@ -360,24 +360,36 @@ CREATE OR REPLACE PROCEDURE _timescaledb_internal.cagg_migrate_execute_refresh_n
|
||||
LANGUAGE plpgsql AS
|
||||
$BODY$
|
||||
DECLARE
|
||||
_cagg REGCLASS;
|
||||
_cagg_name TEXT;
|
||||
_override BOOLEAN;
|
||||
BEGIN
|
||||
_cagg := format('%I.%I', _cagg_data.user_view_schema, _plan_step.config->>'cagg_name_new')::REGCLASS;
|
||||
SELECT (config->>'override')::BOOLEAN
|
||||
INTO _override
|
||||
FROM _timescaledb_catalog.continuous_agg_migrate_plan_step
|
||||
WHERE mat_hypertable_id = _cagg_data.mat_hypertable_id
|
||||
AND type = 'OVERRIDE CAGG';
|
||||
|
||||
CASE _plan_step.config->>'window_start_type'
|
||||
WHEN 'timestamp with time zone' THEN
|
||||
CALL @extschema@.refresh_continuous_aggregate(_cagg, (_plan_step.config->>'window_start')::timestamptz, NULL);
|
||||
WHEN 'timestamp without time zone' THEN
|
||||
CALL @extschema@.refresh_continuous_aggregate(_cagg, (_plan_step.config->>'window_start')::timestamp, NULL);
|
||||
WHEN 'bigint' THEN
|
||||
CALL @extschema@.refresh_continuous_aggregate(_cagg, (_plan_step.config->>'window_start')::bigint, NULL);
|
||||
WHEN 'integer' THEN
|
||||
CALL @extschema@.refresh_continuous_aggregate(_cagg, (_plan_step.config->>'window_start')::integer, NULL);
|
||||
WHEN 'smallint' THEN
|
||||
CALL @extschema@.refresh_continuous_aggregate(_cagg, (_plan_step.config->>'window_start')::smallint, NULL);
|
||||
ELSE
|
||||
RAISE EXCEPTION 'Invalid data type % for time bucket', _plan_step.config->>'window_start_type';
|
||||
END CASE;
|
||||
_cagg_name = _plan_step.config->>'cagg_name_new';
|
||||
|
||||
IF _override IS TRUE THEN
|
||||
_cagg_name = _cagg_data.user_view_name;
|
||||
END IF;
|
||||
|
||||
--
|
||||
-- Since we're still having problems with the `refresh_continuous_aggregate` executed inside procedures
|
||||
-- and the issue isn't easy/trivial to fix we decided to skip this step here WARNING users to do it
|
||||
-- manually after the migration.
|
||||
--
|
||||
-- We didn't remove this step to make backward compatibility with potential existing and not finished
|
||||
-- migrations.
|
||||
--
|
||||
-- Related issue: (https://github.com/timescale/timescaledb/issues/4913)
|
||||
--
|
||||
RAISE WARNING
|
||||
'refresh the continuous aggregate after the migration executing this statement: "CALL @extschema@.refresh_continuous_aggregate(%, CAST(% AS %), NULL);"',
|
||||
quote_literal(format('%I.%I', _cagg_data.user_view_schema, _cagg_name)),
|
||||
quote_literal(_plan_step.config->>'window_start'),
|
||||
_plan_step.config->>'window_start_type';
|
||||
END;
|
||||
$BODY$ SET search_path TO pg_catalog, pg_temp;
|
||||
|
||||
|
@ -178,7 +178,7 @@ SELECT mat_hypertable_id, step_id, status, type, config FROM _timescaledb_catalo
|
||||
-- should resume the execution
|
||||
CALL cagg_migrate('conditions_summary_daily');
|
||||
psql:include/cagg_migrate_common.sql:149: WARNING: resuming the migration of the continuous aggregate "public.conditions_summary_daily"
|
||||
psql:include/cagg_migrate_common.sql:149: NOTICE: continuous aggregate "conditions_summary_daily_new" is already up-to-date
|
||||
psql:include/cagg_migrate_common.sql:149: WARNING: refresh the continuous aggregate after the migration executing this statement: "CALL public.refresh_continuous_aggregate('public.conditions_summary_daily_new', CAST('1008' AS integer), NULL);"
|
||||
SELECT mat_hypertable_id, step_id, status, type, config FROM _timescaledb_catalog.continuous_agg_migrate_plan_step ORDER BY step_id;
|
||||
mat_hypertable_id | step_id | status | type | config
|
||||
-------------------+---------+----------+------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
@ -253,7 +253,7 @@ psql:include/cagg_migrate_common.sql:178: NOTICE: drop cascades to 10 other obj
|
||||
TRUNCATE _timescaledb_catalog.continuous_agg_migrate_plan RESTART IDENTITY CASCADE;
|
||||
psql:include/cagg_migrate_common.sql:179: NOTICE: truncate cascades to table "continuous_agg_migrate_plan_step"
|
||||
CALL cagg_migrate('conditions_summary_daily');
|
||||
psql:include/cagg_migrate_common.sql:180: NOTICE: continuous aggregate "conditions_summary_daily_new" is already up-to-date
|
||||
psql:include/cagg_migrate_common.sql:180: WARNING: refresh the continuous aggregate after the migration executing this statement: "CALL public.refresh_continuous_aggregate('public.conditions_summary_daily_new', CAST('1008' AS integer), NULL);"
|
||||
SELECT
|
||||
ca.raw_hypertable_id AS "NEW_RAW_HYPERTABLE_ID",
|
||||
h.schema_name AS "NEW_MAT_SCHEMA_NAME",
|
||||
@ -397,7 +397,7 @@ SELECT * FROM cagg_jobs WHERE schema = 'public' AND name = 'conditions_summary_d
|
||||
(3 rows)
|
||||
|
||||
CALL cagg_migrate('conditions_summary_daily', override => TRUE);
|
||||
psql:include/cagg_migrate_common.sql:232: NOTICE: continuous aggregate "conditions_summary_daily_new" is already up-to-date
|
||||
psql:include/cagg_migrate_common.sql:232: WARNING: refresh the continuous aggregate after the migration executing this statement: "CALL public.refresh_continuous_aggregate('public.conditions_summary_daily', CAST('1008' AS integer), NULL);"
|
||||
-- cagg with the new format because it was overriden
|
||||
\d+ conditions_summary_daily
|
||||
View "public.conditions_summary_daily"
|
||||
@ -500,7 +500,7 @@ SELECT * FROM cagg_jobs WHERE schema = 'public' AND name = 'conditions_summary_d
|
||||
(3 rows)
|
||||
|
||||
CALL cagg_migrate('conditions_summary_daily', override => TRUE, drop_old => TRUE);
|
||||
psql:include/cagg_migrate_common.sql:254: NOTICE: continuous aggregate "conditions_summary_daily_new" is already up-to-date
|
||||
psql:include/cagg_migrate_common.sql:254: WARNING: refresh the continuous aggregate after the migration executing this statement: "CALL public.refresh_continuous_aggregate('public.conditions_summary_daily', CAST('1008' AS integer), NULL);"
|
||||
psql:include/cagg_migrate_common.sql:254: NOTICE: drop cascades to 10 other objects
|
||||
psql:include/cagg_migrate_common.sql:254: NOTICE: job 1002 not found, skipping
|
||||
psql:include/cagg_migrate_common.sql:254: NOTICE: job 1001 not found, skipping
|
||||
@ -612,7 +612,7 @@ GRANT USAGE ON SEQUENCE _timescaledb_catalog.continuous_agg_migrate_plan_step_st
|
||||
SET ROLE :ROLE_DEFAULT_PERM_USER;
|
||||
-- all necessary permissions granted
|
||||
CALL cagg_migrate('conditions_summary_daily');
|
||||
psql:include/cagg_migrate_common.sql:324: NOTICE: continuous aggregate "conditions_summary_daily_new" is already up-to-date
|
||||
psql:include/cagg_migrate_common.sql:324: WARNING: refresh the continuous aggregate after the migration executing this statement: "CALL public.refresh_continuous_aggregate('public.conditions_summary_daily_new', CAST('1008' AS integer), NULL);"
|
||||
-- check migrated data. should return 0 (zero) rows
|
||||
SELECT * FROM conditions_summary_daily
|
||||
EXCEPT
|
||||
|
@ -213,7 +213,7 @@ SELECT mat_hypertable_id, step_id, status, type, config FROM _timescaledb_catalo
|
||||
-- should resume the execution
|
||||
CALL cagg_migrate('conditions_summary_daily');
|
||||
psql:include/cagg_migrate_common.sql:149: WARNING: resuming the migration of the continuous aggregate "public.conditions_summary_daily"
|
||||
psql:include/cagg_migrate_common.sql:149: NOTICE: continuous aggregate "conditions_summary_daily_new" is already up-to-date
|
||||
psql:include/cagg_migrate_common.sql:149: WARNING: refresh the continuous aggregate after the migration executing this statement: "CALL public.refresh_continuous_aggregate('public.conditions_summary_daily_new', CAST('1008' AS integer), NULL);"
|
||||
SELECT mat_hypertable_id, step_id, status, type, config FROM _timescaledb_catalog.continuous_agg_migrate_plan_step ORDER BY step_id;
|
||||
mat_hypertable_id | step_id | status | type | config
|
||||
-------------------+---------+----------+------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
@ -288,7 +288,7 @@ psql:include/cagg_migrate_common.sql:178: NOTICE: drop cascades to 10 other obj
|
||||
TRUNCATE _timescaledb_catalog.continuous_agg_migrate_plan RESTART IDENTITY CASCADE;
|
||||
psql:include/cagg_migrate_common.sql:179: NOTICE: truncate cascades to table "continuous_agg_migrate_plan_step"
|
||||
CALL cagg_migrate('conditions_summary_daily');
|
||||
psql:include/cagg_migrate_common.sql:180: NOTICE: continuous aggregate "conditions_summary_daily_new" is already up-to-date
|
||||
psql:include/cagg_migrate_common.sql:180: WARNING: refresh the continuous aggregate after the migration executing this statement: "CALL public.refresh_continuous_aggregate('public.conditions_summary_daily_new', CAST('1008' AS integer), NULL);"
|
||||
SELECT
|
||||
ca.raw_hypertable_id AS "NEW_RAW_HYPERTABLE_ID",
|
||||
h.schema_name AS "NEW_MAT_SCHEMA_NAME",
|
||||
@ -432,7 +432,7 @@ SELECT * FROM cagg_jobs WHERE schema = 'public' AND name = 'conditions_summary_d
|
||||
(3 rows)
|
||||
|
||||
CALL cagg_migrate('conditions_summary_daily', override => TRUE);
|
||||
psql:include/cagg_migrate_common.sql:232: NOTICE: continuous aggregate "conditions_summary_daily_new" is already up-to-date
|
||||
psql:include/cagg_migrate_common.sql:232: WARNING: refresh the continuous aggregate after the migration executing this statement: "CALL public.refresh_continuous_aggregate('public.conditions_summary_daily', CAST('1008' AS integer), NULL);"
|
||||
-- cagg with the new format because it was overriden
|
||||
\d+ conditions_summary_daily
|
||||
View "public.conditions_summary_daily"
|
||||
@ -535,7 +535,7 @@ SELECT * FROM cagg_jobs WHERE schema = 'public' AND name = 'conditions_summary_d
|
||||
(3 rows)
|
||||
|
||||
CALL cagg_migrate('conditions_summary_daily', override => TRUE, drop_old => TRUE);
|
||||
psql:include/cagg_migrate_common.sql:254: NOTICE: continuous aggregate "conditions_summary_daily_new" is already up-to-date
|
||||
psql:include/cagg_migrate_common.sql:254: WARNING: refresh the continuous aggregate after the migration executing this statement: "CALL public.refresh_continuous_aggregate('public.conditions_summary_daily', CAST('1008' AS integer), NULL);"
|
||||
psql:include/cagg_migrate_common.sql:254: NOTICE: drop cascades to 10 other objects
|
||||
psql:include/cagg_migrate_common.sql:254: NOTICE: job 1002 not found, skipping
|
||||
psql:include/cagg_migrate_common.sql:254: NOTICE: job 1001 not found, skipping
|
||||
@ -647,7 +647,7 @@ GRANT USAGE ON SEQUENCE _timescaledb_catalog.continuous_agg_migrate_plan_step_st
|
||||
SET ROLE :ROLE_DEFAULT_PERM_USER;
|
||||
-- all necessary permissions granted
|
||||
CALL cagg_migrate('conditions_summary_daily');
|
||||
psql:include/cagg_migrate_common.sql:324: NOTICE: continuous aggregate "conditions_summary_daily_new" is already up-to-date
|
||||
psql:include/cagg_migrate_common.sql:324: WARNING: refresh the continuous aggregate after the migration executing this statement: "CALL public.refresh_continuous_aggregate('public.conditions_summary_daily_new', CAST('1008' AS integer), NULL);"
|
||||
-- check migrated data. should return 0 (zero) rows
|
||||
SELECT * FROM conditions_summary_daily
|
||||
EXCEPT
|
||||
|
@ -170,7 +170,7 @@ SELECT mat_hypertable_id, step_id, status, type, config FROM _timescaledb_catalo
|
||||
-- should resume the execution
|
||||
CALL cagg_migrate('conditions_summary_daily');
|
||||
psql:include/cagg_migrate_common.sql:149: WARNING: resuming the migration of the continuous aggregate "public.conditions_summary_daily"
|
||||
psql:include/cagg_migrate_common.sql:149: NOTICE: continuous aggregate "conditions_summary_daily_new" is already up-to-date
|
||||
psql:include/cagg_migrate_common.sql:149: WARNING: refresh the continuous aggregate after the migration executing this statement: "CALL public.refresh_continuous_aggregate('public.conditions_summary_daily_new', CAST('Sun Jan 01 00:00:00 2023' AS timestamp without time zone), NULL);"
|
||||
SELECT mat_hypertable_id, step_id, status, type, config FROM _timescaledb_catalog.continuous_agg_migrate_plan_step ORDER BY step_id;
|
||||
mat_hypertable_id | step_id | status | type | config
|
||||
-------------------+---------+----------+------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
@ -241,7 +241,7 @@ psql:include/cagg_migrate_common.sql:178: NOTICE: drop cascades to 6 other obje
|
||||
TRUNCATE _timescaledb_catalog.continuous_agg_migrate_plan RESTART IDENTITY CASCADE;
|
||||
psql:include/cagg_migrate_common.sql:179: NOTICE: truncate cascades to table "continuous_agg_migrate_plan_step"
|
||||
CALL cagg_migrate('conditions_summary_daily');
|
||||
psql:include/cagg_migrate_common.sql:180: NOTICE: continuous aggregate "conditions_summary_daily_new" is already up-to-date
|
||||
psql:include/cagg_migrate_common.sql:180: WARNING: refresh the continuous aggregate after the migration executing this statement: "CALL public.refresh_continuous_aggregate('public.conditions_summary_daily_new', CAST('Sun Jan 01 00:00:00 2023' AS timestamp without time zone), NULL);"
|
||||
SELECT
|
||||
ca.raw_hypertable_id AS "NEW_RAW_HYPERTABLE_ID",
|
||||
h.schema_name AS "NEW_MAT_SCHEMA_NAME",
|
||||
@ -373,7 +373,7 @@ SELECT * FROM cagg_jobs WHERE schema = 'public' AND name = 'conditions_summary_d
|
||||
(3 rows)
|
||||
|
||||
CALL cagg_migrate('conditions_summary_daily', override => TRUE);
|
||||
psql:include/cagg_migrate_common.sql:232: NOTICE: continuous aggregate "conditions_summary_daily_new" is already up-to-date
|
||||
psql:include/cagg_migrate_common.sql:232: WARNING: refresh the continuous aggregate after the migration executing this statement: "CALL public.refresh_continuous_aggregate('public.conditions_summary_daily', CAST('Sun Jan 01 00:00:00 2023' AS timestamp without time zone), NULL);"
|
||||
-- cagg with the new format because it was overriden
|
||||
\d+ conditions_summary_daily
|
||||
View "public.conditions_summary_daily"
|
||||
@ -476,7 +476,7 @@ SELECT * FROM cagg_jobs WHERE schema = 'public' AND name = 'conditions_summary_d
|
||||
(3 rows)
|
||||
|
||||
CALL cagg_migrate('conditions_summary_daily', override => TRUE, drop_old => TRUE);
|
||||
psql:include/cagg_migrate_common.sql:254: NOTICE: continuous aggregate "conditions_summary_daily_new" is already up-to-date
|
||||
psql:include/cagg_migrate_common.sql:254: WARNING: refresh the continuous aggregate after the migration executing this statement: "CALL public.refresh_continuous_aggregate('public.conditions_summary_daily', CAST('Sun Jan 01 00:00:00 2023' AS timestamp without time zone), NULL);"
|
||||
psql:include/cagg_migrate_common.sql:254: NOTICE: drop cascades to 6 other objects
|
||||
psql:include/cagg_migrate_common.sql:254: NOTICE: job 1002 not found, skipping
|
||||
psql:include/cagg_migrate_common.sql:254: NOTICE: job 1001 not found, skipping
|
||||
@ -588,7 +588,7 @@ GRANT USAGE ON SEQUENCE _timescaledb_catalog.continuous_agg_migrate_plan_step_st
|
||||
SET ROLE :ROLE_DEFAULT_PERM_USER;
|
||||
-- all necessary permissions granted
|
||||
CALL cagg_migrate('conditions_summary_daily');
|
||||
psql:include/cagg_migrate_common.sql:324: NOTICE: continuous aggregate "conditions_summary_daily_new" is already up-to-date
|
||||
psql:include/cagg_migrate_common.sql:324: WARNING: refresh the continuous aggregate after the migration executing this statement: "CALL public.refresh_continuous_aggregate('public.conditions_summary_daily_new', CAST('Sun Jan 01 00:00:00 2023' AS timestamp without time zone), NULL);"
|
||||
-- check migrated data. should return 0 (zero) rows
|
||||
SELECT * FROM conditions_summary_daily
|
||||
EXCEPT
|
||||
|
@ -205,7 +205,7 @@ SELECT mat_hypertable_id, step_id, status, type, config FROM _timescaledb_catalo
|
||||
-- should resume the execution
|
||||
CALL cagg_migrate('conditions_summary_daily');
|
||||
psql:include/cagg_migrate_common.sql:149: WARNING: resuming the migration of the continuous aggregate "public.conditions_summary_daily"
|
||||
psql:include/cagg_migrate_common.sql:149: NOTICE: continuous aggregate "conditions_summary_daily_new" is already up-to-date
|
||||
psql:include/cagg_migrate_common.sql:149: WARNING: refresh the continuous aggregate after the migration executing this statement: "CALL public.refresh_continuous_aggregate('public.conditions_summary_daily_new', CAST('Sun Jan 01 00:00:00 2023' AS timestamp without time zone), NULL);"
|
||||
SELECT mat_hypertable_id, step_id, status, type, config FROM _timescaledb_catalog.continuous_agg_migrate_plan_step ORDER BY step_id;
|
||||
mat_hypertable_id | step_id | status | type | config
|
||||
-------------------+---------+----------+------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
@ -276,7 +276,7 @@ psql:include/cagg_migrate_common.sql:178: NOTICE: drop cascades to 6 other obje
|
||||
TRUNCATE _timescaledb_catalog.continuous_agg_migrate_plan RESTART IDENTITY CASCADE;
|
||||
psql:include/cagg_migrate_common.sql:179: NOTICE: truncate cascades to table "continuous_agg_migrate_plan_step"
|
||||
CALL cagg_migrate('conditions_summary_daily');
|
||||
psql:include/cagg_migrate_common.sql:180: NOTICE: continuous aggregate "conditions_summary_daily_new" is already up-to-date
|
||||
psql:include/cagg_migrate_common.sql:180: WARNING: refresh the continuous aggregate after the migration executing this statement: "CALL public.refresh_continuous_aggregate('public.conditions_summary_daily_new', CAST('Sun Jan 01 00:00:00 2023' AS timestamp without time zone), NULL);"
|
||||
SELECT
|
||||
ca.raw_hypertable_id AS "NEW_RAW_HYPERTABLE_ID",
|
||||
h.schema_name AS "NEW_MAT_SCHEMA_NAME",
|
||||
@ -408,7 +408,7 @@ SELECT * FROM cagg_jobs WHERE schema = 'public' AND name = 'conditions_summary_d
|
||||
(3 rows)
|
||||
|
||||
CALL cagg_migrate('conditions_summary_daily', override => TRUE);
|
||||
psql:include/cagg_migrate_common.sql:232: NOTICE: continuous aggregate "conditions_summary_daily_new" is already up-to-date
|
||||
psql:include/cagg_migrate_common.sql:232: WARNING: refresh the continuous aggregate after the migration executing this statement: "CALL public.refresh_continuous_aggregate('public.conditions_summary_daily', CAST('Sun Jan 01 00:00:00 2023' AS timestamp without time zone), NULL);"
|
||||
-- cagg with the new format because it was overriden
|
||||
\d+ conditions_summary_daily
|
||||
View "public.conditions_summary_daily"
|
||||
@ -511,7 +511,7 @@ SELECT * FROM cagg_jobs WHERE schema = 'public' AND name = 'conditions_summary_d
|
||||
(3 rows)
|
||||
|
||||
CALL cagg_migrate('conditions_summary_daily', override => TRUE, drop_old => TRUE);
|
||||
psql:include/cagg_migrate_common.sql:254: NOTICE: continuous aggregate "conditions_summary_daily_new" is already up-to-date
|
||||
psql:include/cagg_migrate_common.sql:254: WARNING: refresh the continuous aggregate after the migration executing this statement: "CALL public.refresh_continuous_aggregate('public.conditions_summary_daily', CAST('Sun Jan 01 00:00:00 2023' AS timestamp without time zone), NULL);"
|
||||
psql:include/cagg_migrate_common.sql:254: NOTICE: drop cascades to 6 other objects
|
||||
psql:include/cagg_migrate_common.sql:254: NOTICE: job 1002 not found, skipping
|
||||
psql:include/cagg_migrate_common.sql:254: NOTICE: job 1001 not found, skipping
|
||||
@ -623,7 +623,7 @@ GRANT USAGE ON SEQUENCE _timescaledb_catalog.continuous_agg_migrate_plan_step_st
|
||||
SET ROLE :ROLE_DEFAULT_PERM_USER;
|
||||
-- all necessary permissions granted
|
||||
CALL cagg_migrate('conditions_summary_daily');
|
||||
psql:include/cagg_migrate_common.sql:324: NOTICE: continuous aggregate "conditions_summary_daily_new" is already up-to-date
|
||||
psql:include/cagg_migrate_common.sql:324: WARNING: refresh the continuous aggregate after the migration executing this statement: "CALL public.refresh_continuous_aggregate('public.conditions_summary_daily_new', CAST('Sun Jan 01 00:00:00 2023' AS timestamp without time zone), NULL);"
|
||||
-- check migrated data. should return 0 (zero) rows
|
||||
SELECT * FROM conditions_summary_daily
|
||||
EXCEPT
|
||||
|
@ -169,7 +169,7 @@ SELECT mat_hypertable_id, step_id, status, type, config FROM _timescaledb_catalo
|
||||
-- should resume the execution
|
||||
CALL cagg_migrate('conditions_summary_daily');
|
||||
psql:include/cagg_migrate_common.sql:149: WARNING: resuming the migration of the continuous aggregate "public.conditions_summary_daily"
|
||||
psql:include/cagg_migrate_common.sql:149: NOTICE: continuous aggregate "conditions_summary_daily_new" is already up-to-date
|
||||
psql:include/cagg_migrate_common.sql:149: WARNING: refresh the continuous aggregate after the migration executing this statement: "CALL public.refresh_continuous_aggregate('public.conditions_summary_daily_new', CAST('Sun Jan 01 00:00:00 2023' AS timestamp with time zone), NULL);"
|
||||
SELECT mat_hypertable_id, step_id, status, type, config FROM _timescaledb_catalog.continuous_agg_migrate_plan_step ORDER BY step_id;
|
||||
mat_hypertable_id | step_id | status | type | config
|
||||
-------------------+---------+----------+------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
@ -240,7 +240,7 @@ psql:include/cagg_migrate_common.sql:178: NOTICE: drop cascades to 6 other obje
|
||||
TRUNCATE _timescaledb_catalog.continuous_agg_migrate_plan RESTART IDENTITY CASCADE;
|
||||
psql:include/cagg_migrate_common.sql:179: NOTICE: truncate cascades to table "continuous_agg_migrate_plan_step"
|
||||
CALL cagg_migrate('conditions_summary_daily');
|
||||
psql:include/cagg_migrate_common.sql:180: NOTICE: continuous aggregate "conditions_summary_daily_new" is already up-to-date
|
||||
psql:include/cagg_migrate_common.sql:180: WARNING: refresh the continuous aggregate after the migration executing this statement: "CALL public.refresh_continuous_aggregate('public.conditions_summary_daily_new', CAST('Sun Jan 01 00:00:00 2023' AS timestamp with time zone), NULL);"
|
||||
SELECT
|
||||
ca.raw_hypertable_id AS "NEW_RAW_HYPERTABLE_ID",
|
||||
h.schema_name AS "NEW_MAT_SCHEMA_NAME",
|
||||
@ -372,7 +372,7 @@ SELECT * FROM cagg_jobs WHERE schema = 'public' AND name = 'conditions_summary_d
|
||||
(3 rows)
|
||||
|
||||
CALL cagg_migrate('conditions_summary_daily', override => TRUE);
|
||||
psql:include/cagg_migrate_common.sql:232: NOTICE: continuous aggregate "conditions_summary_daily_new" is already up-to-date
|
||||
psql:include/cagg_migrate_common.sql:232: WARNING: refresh the continuous aggregate after the migration executing this statement: "CALL public.refresh_continuous_aggregate('public.conditions_summary_daily', CAST('Sun Jan 01 00:00:00 2023' AS timestamp with time zone), NULL);"
|
||||
-- cagg with the new format because it was overriden
|
||||
\d+ conditions_summary_daily
|
||||
View "public.conditions_summary_daily"
|
||||
@ -475,7 +475,7 @@ SELECT * FROM cagg_jobs WHERE schema = 'public' AND name = 'conditions_summary_d
|
||||
(3 rows)
|
||||
|
||||
CALL cagg_migrate('conditions_summary_daily', override => TRUE, drop_old => TRUE);
|
||||
psql:include/cagg_migrate_common.sql:254: NOTICE: continuous aggregate "conditions_summary_daily_new" is already up-to-date
|
||||
psql:include/cagg_migrate_common.sql:254: WARNING: refresh the continuous aggregate after the migration executing this statement: "CALL public.refresh_continuous_aggregate('public.conditions_summary_daily', CAST('Sun Jan 01 00:00:00 2023' AS timestamp with time zone), NULL);"
|
||||
psql:include/cagg_migrate_common.sql:254: NOTICE: drop cascades to 6 other objects
|
||||
psql:include/cagg_migrate_common.sql:254: NOTICE: job 1002 not found, skipping
|
||||
psql:include/cagg_migrate_common.sql:254: NOTICE: job 1001 not found, skipping
|
||||
@ -587,7 +587,7 @@ GRANT USAGE ON SEQUENCE _timescaledb_catalog.continuous_agg_migrate_plan_step_st
|
||||
SET ROLE :ROLE_DEFAULT_PERM_USER;
|
||||
-- all necessary permissions granted
|
||||
CALL cagg_migrate('conditions_summary_daily');
|
||||
psql:include/cagg_migrate_common.sql:324: NOTICE: continuous aggregate "conditions_summary_daily_new" is already up-to-date
|
||||
psql:include/cagg_migrate_common.sql:324: WARNING: refresh the continuous aggregate after the migration executing this statement: "CALL public.refresh_continuous_aggregate('public.conditions_summary_daily_new', CAST('Sun Jan 01 00:00:00 2023' AS timestamp with time zone), NULL);"
|
||||
-- check migrated data. should return 0 (zero) rows
|
||||
SELECT * FROM conditions_summary_daily
|
||||
EXCEPT
|
||||
|
@ -204,7 +204,7 @@ SELECT mat_hypertable_id, step_id, status, type, config FROM _timescaledb_catalo
|
||||
-- should resume the execution
|
||||
CALL cagg_migrate('conditions_summary_daily');
|
||||
psql:include/cagg_migrate_common.sql:149: WARNING: resuming the migration of the continuous aggregate "public.conditions_summary_daily"
|
||||
psql:include/cagg_migrate_common.sql:149: NOTICE: continuous aggregate "conditions_summary_daily_new" is already up-to-date
|
||||
psql:include/cagg_migrate_common.sql:149: WARNING: refresh the continuous aggregate after the migration executing this statement: "CALL public.refresh_continuous_aggregate('public.conditions_summary_daily_new', CAST('Sun Jan 01 00:00:00 2023' AS timestamp with time zone), NULL);"
|
||||
SELECT mat_hypertable_id, step_id, status, type, config FROM _timescaledb_catalog.continuous_agg_migrate_plan_step ORDER BY step_id;
|
||||
mat_hypertable_id | step_id | status | type | config
|
||||
-------------------+---------+----------+------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
@ -275,7 +275,7 @@ psql:include/cagg_migrate_common.sql:178: NOTICE: drop cascades to 6 other obje
|
||||
TRUNCATE _timescaledb_catalog.continuous_agg_migrate_plan RESTART IDENTITY CASCADE;
|
||||
psql:include/cagg_migrate_common.sql:179: NOTICE: truncate cascades to table "continuous_agg_migrate_plan_step"
|
||||
CALL cagg_migrate('conditions_summary_daily');
|
||||
psql:include/cagg_migrate_common.sql:180: NOTICE: continuous aggregate "conditions_summary_daily_new" is already up-to-date
|
||||
psql:include/cagg_migrate_common.sql:180: WARNING: refresh the continuous aggregate after the migration executing this statement: "CALL public.refresh_continuous_aggregate('public.conditions_summary_daily_new', CAST('Sun Jan 01 00:00:00 2023' AS timestamp with time zone), NULL);"
|
||||
SELECT
|
||||
ca.raw_hypertable_id AS "NEW_RAW_HYPERTABLE_ID",
|
||||
h.schema_name AS "NEW_MAT_SCHEMA_NAME",
|
||||
@ -407,7 +407,7 @@ SELECT * FROM cagg_jobs WHERE schema = 'public' AND name = 'conditions_summary_d
|
||||
(3 rows)
|
||||
|
||||
CALL cagg_migrate('conditions_summary_daily', override => TRUE);
|
||||
psql:include/cagg_migrate_common.sql:232: NOTICE: continuous aggregate "conditions_summary_daily_new" is already up-to-date
|
||||
psql:include/cagg_migrate_common.sql:232: WARNING: refresh the continuous aggregate after the migration executing this statement: "CALL public.refresh_continuous_aggregate('public.conditions_summary_daily', CAST('Sun Jan 01 00:00:00 2023' AS timestamp with time zone), NULL);"
|
||||
-- cagg with the new format because it was overriden
|
||||
\d+ conditions_summary_daily
|
||||
View "public.conditions_summary_daily"
|
||||
@ -510,7 +510,7 @@ SELECT * FROM cagg_jobs WHERE schema = 'public' AND name = 'conditions_summary_d
|
||||
(3 rows)
|
||||
|
||||
CALL cagg_migrate('conditions_summary_daily', override => TRUE, drop_old => TRUE);
|
||||
psql:include/cagg_migrate_common.sql:254: NOTICE: continuous aggregate "conditions_summary_daily_new" is already up-to-date
|
||||
psql:include/cagg_migrate_common.sql:254: WARNING: refresh the continuous aggregate after the migration executing this statement: "CALL public.refresh_continuous_aggregate('public.conditions_summary_daily', CAST('Sun Jan 01 00:00:00 2023' AS timestamp with time zone), NULL);"
|
||||
psql:include/cagg_migrate_common.sql:254: NOTICE: drop cascades to 6 other objects
|
||||
psql:include/cagg_migrate_common.sql:254: NOTICE: job 1002 not found, skipping
|
||||
psql:include/cagg_migrate_common.sql:254: NOTICE: job 1001 not found, skipping
|
||||
@ -622,7 +622,7 @@ GRANT USAGE ON SEQUENCE _timescaledb_catalog.continuous_agg_migrate_plan_step_st
|
||||
SET ROLE :ROLE_DEFAULT_PERM_USER;
|
||||
-- all necessary permissions granted
|
||||
CALL cagg_migrate('conditions_summary_daily');
|
||||
psql:include/cagg_migrate_common.sql:324: NOTICE: continuous aggregate "conditions_summary_daily_new" is already up-to-date
|
||||
psql:include/cagg_migrate_common.sql:324: WARNING: refresh the continuous aggregate after the migration executing this statement: "CALL public.refresh_continuous_aggregate('public.conditions_summary_daily_new', CAST('Sun Jan 01 00:00:00 2023' AS timestamp with time zone), NULL);"
|
||||
-- check migrated data. should return 0 (zero) rows
|
||||
SELECT * FROM conditions_summary_daily
|
||||
EXCEPT
|
||||
|
Loading…
x
Reference in New Issue
Block a user