mirror of https://github.com/citusdata/citus.git
Remove pg_dist_rebalence_strategy_enterprise_check (#5014)
This is not necessary anymore now that the rebalancer is open source.pull/5016/head
parent
e2704d9ad9
commit
4c20bf7a36
|
@ -2786,13 +2786,12 @@ UpdateColocatedShardPlacementProgress(uint64 shardId, char *sourceName, int sour
|
|||
|
||||
|
||||
/*
|
||||
* citus_rebalance_strategy_enterprise_check is trigger function, intended for
|
||||
* use in prohibiting writes to pg_dist_rebalance_strategy in Citus Community.
|
||||
* pg_dist_rebalance_strategy_enterprise_check is a now removed function, but
|
||||
* to avoid issues during upgrades a C stub is kept.
|
||||
*/
|
||||
Datum
|
||||
pg_dist_rebalance_strategy_enterprise_check(PG_FUNCTION_ARGS)
|
||||
{
|
||||
/* This is Enterprise, so this check is a no-op */
|
||||
PG_RETURN_VOID();
|
||||
}
|
||||
|
||||
|
|
|
@ -44,3 +44,6 @@ WHERE repmodel = 'c'
|
|||
AND partmethod = 'h'
|
||||
AND logicalrelid NOT IN (SELECT * FROM replicated_relations);
|
||||
#include "udfs/citus_shards/10.1-1.sql"
|
||||
|
||||
DROP TRIGGER pg_dist_rebalance_strategy_enterprise_check_trigger ON pg_catalog.pg_dist_rebalance_strategy;
|
||||
DROP FUNCTION citus_internal.pg_dist_rebalance_strategy_enterprise_check();
|
||||
|
|
|
@ -76,4 +76,11 @@ ORDER BY
|
|||
;
|
||||
|
||||
#include "../udfs/citus_finish_pg_upgrade/10.0-1.sql"
|
||||
CREATE FUNCTION citus_internal.pg_dist_rebalance_strategy_enterprise_check()
|
||||
RETURNS TRIGGER
|
||||
LANGUAGE C
|
||||
AS 'MODULE_PATHNAME';
|
||||
CREATE TRIGGER pg_dist_rebalance_strategy_enterprise_check_trigger
|
||||
BEFORE INSERT OR UPDATE OR DELETE OR TRUNCATE ON pg_dist_rebalance_strategy
|
||||
FOR EACH STATEMENT EXECUTE FUNCTION citus_internal.pg_dist_rebalance_strategy_enterprise_check();
|
||||
|
||||
|
|
|
@ -23,7 +23,6 @@ BEGIN
|
|||
INSERT INTO pg_catalog.pg_dist_authinfo SELECT * FROM public.pg_dist_authinfo;
|
||||
INSERT INTO pg_catalog.pg_dist_poolinfo SELECT * FROM public.pg_dist_poolinfo;
|
||||
|
||||
ALTER TABLE pg_catalog.pg_dist_rebalance_strategy DISABLE TRIGGER pg_dist_rebalance_strategy_enterprise_check_trigger;
|
||||
INSERT INTO pg_catalog.pg_dist_rebalance_strategy SELECT
|
||||
name,
|
||||
default_strategy,
|
||||
|
@ -34,7 +33,6 @@ BEGIN
|
|||
minimum_threshold,
|
||||
improvement_threshold
|
||||
FROM public.pg_dist_rebalance_strategy;
|
||||
ALTER TABLE pg_catalog.pg_dist_rebalance_strategy ENABLE TRIGGER pg_dist_rebalance_strategy_enterprise_check_trigger;
|
||||
|
||||
--
|
||||
-- drop backup tables
|
||||
|
|
|
@ -23,7 +23,6 @@ BEGIN
|
|||
INSERT INTO pg_catalog.pg_dist_authinfo SELECT * FROM public.pg_dist_authinfo;
|
||||
INSERT INTO pg_catalog.pg_dist_poolinfo SELECT * FROM public.pg_dist_poolinfo;
|
||||
|
||||
ALTER TABLE pg_catalog.pg_dist_rebalance_strategy DISABLE TRIGGER pg_dist_rebalance_strategy_enterprise_check_trigger;
|
||||
INSERT INTO pg_catalog.pg_dist_rebalance_strategy SELECT
|
||||
name,
|
||||
default_strategy,
|
||||
|
@ -34,7 +33,6 @@ BEGIN
|
|||
minimum_threshold,
|
||||
improvement_threshold
|
||||
FROM public.pg_dist_rebalance_strategy;
|
||||
ALTER TABLE pg_catalog.pg_dist_rebalance_strategy ENABLE TRIGGER pg_dist_rebalance_strategy_enterprise_check_trigger;
|
||||
|
||||
--
|
||||
-- drop backup tables
|
||||
|
|
|
@ -568,6 +568,7 @@ SELECT * FROM print_extension_changes();
|
|||
---------------------------------------------------------------------
|
||||
function citus_add_rebalance_strategy(name,regproc,regproc,regproc,real,real) void |
|
||||
function citus_internal.columnar_ensure_objects_exist() void |
|
||||
function citus_internal.pg_dist_rebalance_strategy_enterprise_check() trigger |
|
||||
function create_distributed_table(regclass,text,citus.distribution_type,text) void |
|
||||
function get_rebalance_progress() TABLE(sessionid integer, table_name regclass, shardid bigint, shard_size bigint, sourcename text, sourceport integer, targetname text, targetport integer, progress bigint) |
|
||||
function get_rebalance_table_shards_plan(regclass,real,integer,bigint[],boolean,name) TABLE(table_name regclass, shardid bigint, shard_size bigint, sourcename text, sourceport integer, targetname text, targetport integer) |
|
||||
|
@ -579,7 +580,7 @@ SELECT * FROM print_extension_changes();
|
|||
| function worker_partitioned_relation_size(regclass) bigint
|
||||
| function worker_partitioned_relation_total_size(regclass) bigint
|
||||
| function worker_partitioned_table_size(regclass) bigint
|
||||
(13 rows)
|
||||
(14 rows)
|
||||
|
||||
DROP TABLE prev_objects, extension_diff;
|
||||
-- show running version
|
||||
|
|
|
@ -58,7 +58,6 @@ ORDER BY 1;
|
|||
function citus_get_active_worker_nodes()
|
||||
function citus_internal.find_groupid_for_node(text,integer)
|
||||
function citus_internal.pg_dist_node_trigger_func()
|
||||
function citus_internal.pg_dist_rebalance_strategy_enterprise_check()
|
||||
function citus_internal.pg_dist_rebalance_strategy_trigger_func()
|
||||
function citus_internal.pg_dist_shard_placement_trigger_func()
|
||||
function citus_internal.refresh_isolation_tester_prepared_statement()
|
||||
|
@ -246,5 +245,5 @@ ORDER BY 1;
|
|||
view citus_worker_stat_activity
|
||||
view pg_dist_shard_placement
|
||||
view time_partitions
|
||||
(230 rows)
|
||||
(229 rows)
|
||||
|
||||
|
|
Loading…
Reference in New Issue