Downgrade drop_timeseries_table properly

velioglu/create_timeseries_table
Burak Velioglu 2021-08-27 17:21:26 +03:00
parent d23b8d3b8b
commit acc787fac3
No known key found for this signature in database
GPG Key ID: F6827E620F6549C6
2 changed files with 16 additions and 2 deletions

View File

@ -2,9 +2,17 @@ SET search_path TO timeseries;
DROP FUNCTION pg_catalog.create_missing_partitions(regclass,timestamp with time zone,timestamp with time zone);
DROP FUNCTION pg_catalog.create_timeseries_table(regclass,interval,integer,integer,timestamp with time zone,interval,interval);
DROP FUNCTION pg_catalog.drop_timeseries_table(regclass);
DROP FUNCTION pg_catalog.get_missing_partition_ranges(regclass,timestamp with time zone,timestamp with time zone);
-- In Citus 10.2, we added another internal udf (drop_timeseries_table)
-- to be called by citus_drop_trigger. Since this script is executed when
-- downgrading Citus, we don't have drop_timeseries_table in citus.so.
-- For this reason, we first need to downgrade citus_drop_trigger so it doesn't
-- call drop_timeseries_table.
#include "../../../distributed/sql/udfs/citus_drop_trigger/10.0-1.sql"
-- Now we can safely drop drop_timeseries_table as we downgraded citus_drop_trigger.
DROP FUNCTION pg_catalog.drop_timeseries_table(regclass);
DROP TABLE tables;
RESET search_path;

View File

@ -804,8 +804,14 @@ SELECT * FROM multi_extension.print_extension_changes();
| function citus_internal_delete_shard_metadata(bigint) void
| function citus_internal_update_placement_metadata(bigint,integer,integer) void
| function citus_internal_update_relation_colocation(oid,integer) void
| function create_missing_partitions(regclass,timestamp with time zone,timestamp with time zone) boolean
| function create_timeseries_table(regclass,interval,integer,integer,timestamp with time zone,interval,interval) void
| function drop_timeseries_table(regclass) void
| function get_missing_partition_ranges(regclass,timestamp with time zone,timestamp with time zone) TABLE(range_from_value text, range_to_value text)
| function stop_metadata_sync_to_node(text,integer,boolean) void
(10 rows)
| schema timeseries
| table timeseries.tables
(16 rows)
DROP TABLE multi_extension.prev_objects, multi_extension.extension_diff;
-- show running version