mirror of https://github.com/citusdata/citus.git
Recreate invalidation functions for Citus10
Fix multi_create_table Add schema name to altered functions Recreate invalidation functions when downgradingpull/4503/head
parent
9cffd41389
commit
9b56ad48cb
|
@ -271,6 +271,7 @@ PG_FUNCTION_INFO_V1(citus_dist_node_cache_invalidate);
|
||||||
PG_FUNCTION_INFO_V1(master_dist_node_cache_invalidate);
|
PG_FUNCTION_INFO_V1(master_dist_node_cache_invalidate);
|
||||||
PG_FUNCTION_INFO_V1(citus_dist_local_group_cache_invalidate);
|
PG_FUNCTION_INFO_V1(citus_dist_local_group_cache_invalidate);
|
||||||
PG_FUNCTION_INFO_V1(master_dist_local_group_cache_invalidate);
|
PG_FUNCTION_INFO_V1(master_dist_local_group_cache_invalidate);
|
||||||
|
PG_FUNCTION_INFO_V1(citus_conninfo_cache_invalidate);
|
||||||
PG_FUNCTION_INFO_V1(master_dist_authinfo_cache_invalidate);
|
PG_FUNCTION_INFO_V1(master_dist_authinfo_cache_invalidate);
|
||||||
PG_FUNCTION_INFO_V1(citus_dist_object_cache_invalidate);
|
PG_FUNCTION_INFO_V1(citus_dist_object_cache_invalidate);
|
||||||
PG_FUNCTION_INFO_V1(master_dist_object_cache_invalidate);
|
PG_FUNCTION_INFO_V1(master_dist_object_cache_invalidate);
|
||||||
|
@ -2913,7 +2914,7 @@ master_dist_node_cache_invalidate(PG_FUNCTION_ARGS)
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* master_dist_authinfo_cache_invalidate is a trigger function that performs
|
* citus_conninfo_cache_invalidate is a trigger function that performs
|
||||||
* relcache invalidations when the contents of pg_dist_authinfo are changed
|
* relcache invalidations when the contents of pg_dist_authinfo are changed
|
||||||
* on the SQL level.
|
* on the SQL level.
|
||||||
*
|
*
|
||||||
|
@ -2921,7 +2922,7 @@ master_dist_node_cache_invalidate(PG_FUNCTION_ARGS)
|
||||||
* are much easier ways to waste CPU than causing cache invalidations.
|
* are much easier ways to waste CPU than causing cache invalidations.
|
||||||
*/
|
*/
|
||||||
Datum
|
Datum
|
||||||
master_dist_authinfo_cache_invalidate(PG_FUNCTION_ARGS)
|
citus_conninfo_cache_invalidate(PG_FUNCTION_ARGS)
|
||||||
{
|
{
|
||||||
if (!CALLED_AS_TRIGGER(fcinfo))
|
if (!CALLED_AS_TRIGGER(fcinfo))
|
||||||
{
|
{
|
||||||
|
@ -2937,6 +2938,16 @@ master_dist_authinfo_cache_invalidate(PG_FUNCTION_ARGS)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* master_dist_authinfo_cache_invalidate is a wrapper function for old UDF name.
|
||||||
|
*/
|
||||||
|
Datum
|
||||||
|
master_dist_authinfo_cache_invalidate(PG_FUNCTION_ARGS)
|
||||||
|
{
|
||||||
|
return citus_conninfo_cache_invalidate(fcinfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* citus_dist_local_group_cache_invalidate is a trigger function that performs
|
* citus_dist_local_group_cache_invalidate is a trigger function that performs
|
||||||
* relcache invalidations when the contents of pg_dist_local_group are changed
|
* relcache invalidations when the contents of pg_dist_local_group are changed
|
||||||
|
|
|
@ -33,26 +33,35 @@ DROP FUNCTION IF EXISTS pg_catalog.citus_total_relation_size(regclass);
|
||||||
#include "udfs/time_partition_range/10.0-1.sql"
|
#include "udfs/time_partition_range/10.0-1.sql"
|
||||||
#include "udfs/time_partitions/10.0-1.sql"
|
#include "udfs/time_partitions/10.0-1.sql"
|
||||||
|
|
||||||
ALTER FUNCTION master_conninfo_cache_invalidate()
|
ALTER FUNCTION pg_catalog.master_conninfo_cache_invalidate()
|
||||||
RENAME TO citus_conninfo_cache_invalidate;
|
RENAME TO citus_conninfo_cache_invalidate;
|
||||||
ALTER FUNCTION master_dist_local_group_cache_invalidate()
|
ALTER FUNCTION pg_catalog.master_dist_local_group_cache_invalidate()
|
||||||
RENAME TO citus_dist_local_group_cache_invalidate;
|
RENAME TO citus_dist_local_group_cache_invalidate;
|
||||||
ALTER FUNCTION master_dist_node_cache_invalidate()
|
ALTER FUNCTION pg_catalog.master_dist_node_cache_invalidate()
|
||||||
RENAME TO citus_dist_node_cache_invalidate;
|
RENAME TO citus_dist_node_cache_invalidate;
|
||||||
ALTER FUNCTION master_dist_object_cache_invalidate()
|
ALTER FUNCTION pg_catalog.master_dist_object_cache_invalidate()
|
||||||
RENAME TO citus_dist_object_cache_invalidate;
|
RENAME TO citus_dist_object_cache_invalidate;
|
||||||
ALTER FUNCTION master_dist_partition_cache_invalidate()
|
ALTER FUNCTION pg_catalog.master_dist_partition_cache_invalidate()
|
||||||
RENAME TO citus_dist_partition_cache_invalidate;
|
RENAME TO citus_dist_partition_cache_invalidate;
|
||||||
ALTER FUNCTION master_dist_placement_cache_invalidate()
|
ALTER FUNCTION pg_catalog.master_dist_placement_cache_invalidate()
|
||||||
RENAME TO citus_dist_placement_cache_invalidate;
|
RENAME TO citus_dist_placement_cache_invalidate;
|
||||||
ALTER FUNCTION master_dist_shard_cache_invalidate()
|
ALTER FUNCTION pg_catalog.master_dist_shard_cache_invalidate()
|
||||||
RENAME TO citus_dist_shard_cache_invalidate;
|
RENAME TO citus_dist_shard_cache_invalidate;
|
||||||
ALTER FUNCTION master_drop_all_shards(regclass, text, text)
|
|
||||||
|
#include "udfs/citus_conninfo_cache_invalidate/10.0-1.sql"
|
||||||
|
#include "udfs/citus_dist_local_group_cache_invalidate/10.0-1.sql"
|
||||||
|
#include "udfs/citus_dist_node_cache_invalidate/10.0-1.sql"
|
||||||
|
#include "udfs/citus_dist_object_cache_invalidate/10.0-1.sql"
|
||||||
|
#include "udfs/citus_dist_partition_cache_invalidate/10.0-1.sql"
|
||||||
|
#include "udfs/citus_dist_placement_cache_invalidate/10.0-1.sql"
|
||||||
|
#include "udfs/citus_dist_shard_cache_invalidate/10.0-1.sql"
|
||||||
|
|
||||||
|
ALTER FUNCTION pg_catalog.master_drop_all_shards(regclass, text, text)
|
||||||
RENAME TO citus_drop_all_shards;
|
RENAME TO citus_drop_all_shards;
|
||||||
|
|
||||||
DROP FUNCTION pg_catalog.master_modify_multiple_shards(text);
|
DROP FUNCTION pg_catalog.master_modify_multiple_shards(text);
|
||||||
DROP FUNCTION master_create_distributed_table(regclass, text, citus.distribution_type);
|
DROP FUNCTION pg_catalog.master_create_distributed_table(regclass, text, citus.distribution_type);
|
||||||
DROP FUNCTION master_create_worker_shards(text, integer, integer);
|
DROP FUNCTION pg_catalog.master_create_worker_shards(text, integer, integer);
|
||||||
#include "udfs/citus_shard_sizes/10.0-1.sql"
|
#include "udfs/citus_shard_sizes/10.0-1.sql"
|
||||||
#include "udfs/citus_shards/10.0-1.sql"
|
#include "udfs/citus_shards/10.0-1.sql"
|
||||||
|
|
||||||
|
|
|
@ -26,23 +26,31 @@ DROP FUNCTION pg_catalog.citus_update_table_statistics(regclass);
|
||||||
DROP FUNCTION pg_catalog.citus_copy_shard_placement(bigint, text, integer, text, integer, bool, citus.shard_transfer_mode);
|
DROP FUNCTION pg_catalog.citus_copy_shard_placement(bigint, text, integer, text, integer, bool, citus.shard_transfer_mode);
|
||||||
DROP FUNCTION pg_catalog.citus_move_shard_placement(bigint, text, integer, text, integer, citus.shard_transfer_mode);
|
DROP FUNCTION pg_catalog.citus_move_shard_placement(bigint, text, integer, text, integer, citus.shard_transfer_mode);
|
||||||
|
|
||||||
ALTER FUNCTION citus_conninfo_cache_invalidate()
|
ALTER FUNCTION pg_catalog.citus_conninfo_cache_invalidate()
|
||||||
RENAME TO master_conninfo_cache_invalidate;
|
RENAME TO master_conninfo_cache_invalidate;
|
||||||
ALTER FUNCTION citus_dist_local_group_cache_invalidate()
|
ALTER FUNCTION pg_catalog.citus_dist_local_group_cache_invalidate()
|
||||||
RENAME TO master_dist_local_group_cache_invalidate;
|
RENAME TO master_dist_local_group_cache_invalidate;
|
||||||
ALTER FUNCTION citus_dist_node_cache_invalidate()
|
ALTER FUNCTION pg_catalog.citus_dist_node_cache_invalidate()
|
||||||
RENAME TO master_dist_node_cache_invalidate;
|
RENAME TO master_dist_node_cache_invalidate;
|
||||||
ALTER FUNCTION citus_dist_object_cache_invalidate()
|
ALTER FUNCTION pg_catalog.citus_dist_object_cache_invalidate()
|
||||||
RENAME TO master_dist_object_cache_invalidate;
|
RENAME TO master_dist_object_cache_invalidate;
|
||||||
ALTER FUNCTION citus_dist_partition_cache_invalidate()
|
ALTER FUNCTION pg_catalog.citus_dist_partition_cache_invalidate()
|
||||||
RENAME TO master_dist_partition_cache_invalidate;
|
RENAME TO master_dist_partition_cache_invalidate;
|
||||||
ALTER FUNCTION citus_dist_placement_cache_invalidate()
|
ALTER FUNCTION pg_catalog.citus_dist_placement_cache_invalidate()
|
||||||
RENAME TO master_dist_placement_cache_invalidate;
|
RENAME TO master_dist_placement_cache_invalidate;
|
||||||
ALTER FUNCTION citus_dist_shard_cache_invalidate()
|
ALTER FUNCTION pg_catalog.citus_dist_shard_cache_invalidate()
|
||||||
RENAME TO master_dist_shard_cache_invalidate;
|
RENAME TO master_dist_shard_cache_invalidate;
|
||||||
ALTER FUNCTION citus_drop_all_shards(regclass, text, text)
|
ALTER FUNCTION pg_catalog.citus_drop_all_shards(regclass, text, text)
|
||||||
RENAME TO master_drop_all_shards;
|
RENAME TO master_drop_all_shards;
|
||||||
|
|
||||||
|
#include "../udfs/citus_conninfo_cache_invalidate/9.5-1.sql"
|
||||||
|
#include "../udfs/citus_dist_local_group_cache_invalidate/9.5-1.sql"
|
||||||
|
#include "../udfs/citus_dist_node_cache_invalidate/9.5-1.sql"
|
||||||
|
#include "../udfs/citus_dist_object_cache_invalidate/9.5-1.sql"
|
||||||
|
#include "../udfs/citus_dist_partition_cache_invalidate/9.5-1.sql"
|
||||||
|
#include "../udfs/citus_dist_placement_cache_invalidate/9.5-1.sql"
|
||||||
|
#include "../udfs/citus_dist_shard_cache_invalidate/9.5-1.sql"
|
||||||
|
|
||||||
DROP VIEW pg_catalog.time_partitions;
|
DROP VIEW pg_catalog.time_partitions;
|
||||||
DROP FUNCTION pg_catalog.time_partition_range(regclass);
|
DROP FUNCTION pg_catalog.time_partition_range(regclass);
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
CREATE OR REPLACE FUNCTION pg_catalog.citus_conninfo_cache_invalidate()
|
||||||
|
RETURNS trigger
|
||||||
|
LANGUAGE C
|
||||||
|
AS 'MODULE_PATHNAME', $$citus_conninfo_cache_invalidate$$;
|
||||||
|
COMMENT ON FUNCTION pg_catalog.citus_conninfo_cache_invalidate()
|
||||||
|
IS 'register relcache invalidation for changed rows';
|
|
@ -0,0 +1,6 @@
|
||||||
|
CREATE OR REPLACE FUNCTION pg_catalog.master_conninfo_cache_invalidate()
|
||||||
|
RETURNS trigger
|
||||||
|
LANGUAGE C
|
||||||
|
AS 'MODULE_PATHNAME', $$master_dist_authinfo_cache_invalidate$$;
|
||||||
|
COMMENT ON FUNCTION pg_catalog.master_conninfo_cache_invalidate()
|
||||||
|
IS 'register relcache invalidation for changed rows';
|
|
@ -0,0 +1,6 @@
|
||||||
|
CREATE OR REPLACE FUNCTION pg_catalog.citus_conninfo_cache_invalidate()
|
||||||
|
RETURNS trigger
|
||||||
|
LANGUAGE C
|
||||||
|
AS 'MODULE_PATHNAME', $$citus_conninfo_cache_invalidate$$;
|
||||||
|
COMMENT ON FUNCTION pg_catalog.citus_conninfo_cache_invalidate()
|
||||||
|
IS 'register relcache invalidation for changed rows';
|
6
src/backend/distributed/sql/udfs/citus_dist_local_group_cache_invalidate/10.0-1.sql
generated
Normal file
6
src/backend/distributed/sql/udfs/citus_dist_local_group_cache_invalidate/10.0-1.sql
generated
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
CREATE OR REPLACE FUNCTION pg_catalog.citus_dist_local_group_cache_invalidate()
|
||||||
|
RETURNS trigger
|
||||||
|
LANGUAGE C
|
||||||
|
AS 'MODULE_PATHNAME', $$citus_dist_local_group_cache_invalidate$$;
|
||||||
|
COMMENT ON FUNCTION pg_catalog.citus_dist_local_group_cache_invalidate()
|
||||||
|
IS 'register node cache invalidation for changed rows';
|
6
src/backend/distributed/sql/udfs/citus_dist_local_group_cache_invalidate/9.5-1.sql
generated
Normal file
6
src/backend/distributed/sql/udfs/citus_dist_local_group_cache_invalidate/9.5-1.sql
generated
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
CREATE OR REPLACE FUNCTION pg_catalog.master_dist_local_group_cache_invalidate()
|
||||||
|
RETURNS trigger
|
||||||
|
LANGUAGE C
|
||||||
|
AS 'MODULE_PATHNAME', $$master_dist_local_group_cache_invalidate$$;
|
||||||
|
COMMENT ON FUNCTION pg_catalog.master_dist_local_group_cache_invalidate()
|
||||||
|
IS 'register node cache invalidation for changed rows';
|
|
@ -0,0 +1,6 @@
|
||||||
|
CREATE OR REPLACE FUNCTION pg_catalog.citus_dist_local_group_cache_invalidate()
|
||||||
|
RETURNS trigger
|
||||||
|
LANGUAGE C
|
||||||
|
AS 'MODULE_PATHNAME', $$citus_dist_local_group_cache_invalidate$$;
|
||||||
|
COMMENT ON FUNCTION pg_catalog.citus_dist_local_group_cache_invalidate()
|
||||||
|
IS 'register node cache invalidation for changed rows';
|
6
src/backend/distributed/sql/udfs/citus_dist_node_cache_invalidate/10.0-1.sql
generated
Normal file
6
src/backend/distributed/sql/udfs/citus_dist_node_cache_invalidate/10.0-1.sql
generated
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
CREATE OR REPLACE FUNCTION pg_catalog.citus_dist_node_cache_invalidate()
|
||||||
|
RETURNS trigger
|
||||||
|
LANGUAGE C
|
||||||
|
AS 'MODULE_PATHNAME', $$citus_dist_node_cache_invalidate$$;
|
||||||
|
COMMENT ON FUNCTION pg_catalog.citus_dist_node_cache_invalidate()
|
||||||
|
IS 'register relcache invalidation for changed rows';
|
|
@ -0,0 +1,6 @@
|
||||||
|
CREATE OR REPLACE FUNCTION pg_catalog.master_dist_node_cache_invalidate()
|
||||||
|
RETURNS trigger
|
||||||
|
LANGUAGE C
|
||||||
|
AS 'MODULE_PATHNAME', $$master_dist_node_cache_invalidate$$;
|
||||||
|
COMMENT ON FUNCTION pg_catalog.master_dist_node_cache_invalidate()
|
||||||
|
IS 'register relcache invalidation for changed rows';
|
|
@ -0,0 +1,6 @@
|
||||||
|
CREATE OR REPLACE FUNCTION pg_catalog.citus_dist_node_cache_invalidate()
|
||||||
|
RETURNS trigger
|
||||||
|
LANGUAGE C
|
||||||
|
AS 'MODULE_PATHNAME', $$citus_dist_node_cache_invalidate$$;
|
||||||
|
COMMENT ON FUNCTION pg_catalog.citus_dist_node_cache_invalidate()
|
||||||
|
IS 'register relcache invalidation for changed rows';
|
6
src/backend/distributed/sql/udfs/citus_dist_object_cache_invalidate/10.0-1.sql
generated
Normal file
6
src/backend/distributed/sql/udfs/citus_dist_object_cache_invalidate/10.0-1.sql
generated
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
CREATE OR REPLACE FUNCTION pg_catalog.citus_dist_object_cache_invalidate()
|
||||||
|
RETURNS trigger
|
||||||
|
LANGUAGE C
|
||||||
|
AS 'MODULE_PATHNAME', $$citus_dist_object_cache_invalidate$$;
|
||||||
|
COMMENT ON FUNCTION pg_catalog.citus_dist_object_cache_invalidate()
|
||||||
|
IS 'register relcache invalidation for changed rows';
|
6
src/backend/distributed/sql/udfs/citus_dist_object_cache_invalidate/9.5-1.sql
generated
Normal file
6
src/backend/distributed/sql/udfs/citus_dist_object_cache_invalidate/9.5-1.sql
generated
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
CREATE OR REPLACE FUNCTION pg_catalog.master_dist_object_cache_invalidate()
|
||||||
|
RETURNS trigger
|
||||||
|
LANGUAGE C
|
||||||
|
AS 'MODULE_PATHNAME', $$master_dist_object_cache_invalidate$$;
|
||||||
|
COMMENT ON FUNCTION pg_catalog.master_dist_object_cache_invalidate()
|
||||||
|
IS 'register relcache invalidation for changed rows';
|
|
@ -0,0 +1,6 @@
|
||||||
|
CREATE OR REPLACE FUNCTION pg_catalog.citus_dist_object_cache_invalidate()
|
||||||
|
RETURNS trigger
|
||||||
|
LANGUAGE C
|
||||||
|
AS 'MODULE_PATHNAME', $$citus_dist_object_cache_invalidate$$;
|
||||||
|
COMMENT ON FUNCTION pg_catalog.citus_dist_object_cache_invalidate()
|
||||||
|
IS 'register relcache invalidation for changed rows';
|
6
src/backend/distributed/sql/udfs/citus_dist_partition_cache_invalidate/10.0-1.sql
generated
Normal file
6
src/backend/distributed/sql/udfs/citus_dist_partition_cache_invalidate/10.0-1.sql
generated
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
CREATE OR REPLACE FUNCTION pg_catalog.citus_dist_partition_cache_invalidate()
|
||||||
|
RETURNS trigger
|
||||||
|
LANGUAGE C
|
||||||
|
AS 'citus', $$citus_dist_partition_cache_invalidate$$;
|
||||||
|
COMMENT ON FUNCTION pg_catalog.citus_dist_partition_cache_invalidate()
|
||||||
|
IS 'register relcache invalidation for changed rows';
|
6
src/backend/distributed/sql/udfs/citus_dist_partition_cache_invalidate/9.5-1.sql
generated
Normal file
6
src/backend/distributed/sql/udfs/citus_dist_partition_cache_invalidate/9.5-1.sql
generated
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
CREATE OR REPLACE FUNCTION pg_catalog.master_dist_partition_cache_invalidate()
|
||||||
|
RETURNS trigger
|
||||||
|
LANGUAGE C
|
||||||
|
AS 'citus', $$master_dist_partition_cache_invalidate$$;
|
||||||
|
COMMENT ON FUNCTION pg_catalog.master_dist_partition_cache_invalidate()
|
||||||
|
IS 'register relcache invalidation for changed rows';
|
|
@ -0,0 +1,6 @@
|
||||||
|
CREATE OR REPLACE FUNCTION pg_catalog.citus_dist_partition_cache_invalidate()
|
||||||
|
RETURNS trigger
|
||||||
|
LANGUAGE C
|
||||||
|
AS 'citus', $$citus_dist_partition_cache_invalidate$$;
|
||||||
|
COMMENT ON FUNCTION pg_catalog.citus_dist_partition_cache_invalidate()
|
||||||
|
IS 'register relcache invalidation for changed rows';
|
6
src/backend/distributed/sql/udfs/citus_dist_placement_cache_invalidate/10.0-1.sql
generated
Normal file
6
src/backend/distributed/sql/udfs/citus_dist_placement_cache_invalidate/10.0-1.sql
generated
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
CREATE OR REPLACE FUNCTION pg_catalog.citus_dist_placement_cache_invalidate()
|
||||||
|
RETURNS trigger
|
||||||
|
LANGUAGE C
|
||||||
|
AS 'MODULE_PATHNAME', $$citus_dist_placement_cache_invalidate$$;
|
||||||
|
COMMENT ON FUNCTION pg_catalog.citus_dist_placement_cache_invalidate()
|
||||||
|
IS 'register relcache invalidation for changed rows';
|
6
src/backend/distributed/sql/udfs/citus_dist_placement_cache_invalidate/9.5-1.sql
generated
Normal file
6
src/backend/distributed/sql/udfs/citus_dist_placement_cache_invalidate/9.5-1.sql
generated
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
CREATE OR REPLACE FUNCTION pg_catalog.master_dist_placement_cache_invalidate()
|
||||||
|
RETURNS trigger
|
||||||
|
LANGUAGE C
|
||||||
|
AS 'MODULE_PATHNAME', $$master_dist_placement_cache_invalidate$$;
|
||||||
|
COMMENT ON FUNCTION pg_catalog.master_dist_placement_cache_invalidate()
|
||||||
|
IS 'register relcache invalidation for changed rows';
|
|
@ -0,0 +1,6 @@
|
||||||
|
CREATE OR REPLACE FUNCTION pg_catalog.citus_dist_placement_cache_invalidate()
|
||||||
|
RETURNS trigger
|
||||||
|
LANGUAGE C
|
||||||
|
AS 'MODULE_PATHNAME', $$citus_dist_placement_cache_invalidate$$;
|
||||||
|
COMMENT ON FUNCTION pg_catalog.citus_dist_placement_cache_invalidate()
|
||||||
|
IS 'register relcache invalidation for changed rows';
|
6
src/backend/distributed/sql/udfs/citus_dist_shard_cache_invalidate/10.0-1.sql
generated
Normal file
6
src/backend/distributed/sql/udfs/citus_dist_shard_cache_invalidate/10.0-1.sql
generated
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
CREATE OR REPLACE FUNCTION pg_catalog.citus_dist_shard_cache_invalidate()
|
||||||
|
RETURNS trigger
|
||||||
|
LANGUAGE C
|
||||||
|
AS 'MODULE_PATHNAME', $$citus_dist_shard_cache_invalidate$$;
|
||||||
|
COMMENT ON FUNCTION pg_catalog.citus_dist_shard_cache_invalidate()
|
||||||
|
IS 'register relcache invalidation for changed rows';
|
6
src/backend/distributed/sql/udfs/citus_dist_shard_cache_invalidate/9.5-1.sql
generated
Normal file
6
src/backend/distributed/sql/udfs/citus_dist_shard_cache_invalidate/9.5-1.sql
generated
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
CREATE OR REPLACE FUNCTION pg_catalog.master_dist_shard_cache_invalidate()
|
||||||
|
RETURNS trigger
|
||||||
|
LANGUAGE C
|
||||||
|
AS 'MODULE_PATHNAME', $$master_dist_shard_cache_invalidate$$;
|
||||||
|
COMMENT ON FUNCTION pg_catalog.master_dist_shard_cache_invalidate()
|
||||||
|
IS 'register relcache invalidation for changed rows';
|
|
@ -0,0 +1,6 @@
|
||||||
|
CREATE OR REPLACE FUNCTION pg_catalog.citus_dist_shard_cache_invalidate()
|
||||||
|
RETURNS trigger
|
||||||
|
LANGUAGE C
|
||||||
|
AS 'MODULE_PATHNAME', $$citus_dist_shard_cache_invalidate$$;
|
||||||
|
COMMENT ON FUNCTION pg_catalog.citus_dist_shard_cache_invalidate()
|
||||||
|
IS 'register relcache invalidation for changed rows';
|
|
@ -6,6 +6,23 @@
|
||||||
-- need to cover both reference join and partitioned join, we have created
|
-- need to cover both reference join and partitioned join, we have created
|
||||||
-- reference and append distributed version of orders, customer and part tables.
|
-- reference and append distributed version of orders, customer and part tables.
|
||||||
SET citus.next_shard_id TO 360000;
|
SET citus.next_shard_id TO 360000;
|
||||||
|
-- this function is dropped in Citus10, added here for tests
|
||||||
|
CREATE OR REPLACE FUNCTION pg_catalog.master_create_distributed_table(table_name regclass,
|
||||||
|
distribution_column text,
|
||||||
|
distribution_method citus.distribution_type)
|
||||||
|
RETURNS void
|
||||||
|
LANGUAGE C STRICT
|
||||||
|
AS 'citus', $$master_create_distributed_table$$;
|
||||||
|
COMMENT ON FUNCTION pg_catalog.master_create_distributed_table(table_name regclass,
|
||||||
|
distribution_column text,
|
||||||
|
distribution_method citus.distribution_type)
|
||||||
|
IS 'define the table distribution functions';
|
||||||
|
-- this function is dropped in Citus10, added here for tests
|
||||||
|
CREATE OR REPLACE FUNCTION pg_catalog.master_create_worker_shards(table_name text, shard_count integer,
|
||||||
|
replication_factor integer DEFAULT 2)
|
||||||
|
RETURNS void
|
||||||
|
AS 'citus', $$master_create_worker_shards$$
|
||||||
|
LANGUAGE C STRICT;
|
||||||
CREATE TABLE lineitem (
|
CREATE TABLE lineitem (
|
||||||
l_orderkey bigint not null,
|
l_orderkey bigint not null,
|
||||||
l_partkey integer not null,
|
l_partkey integer not null,
|
||||||
|
|
|
@ -9,6 +9,25 @@
|
||||||
|
|
||||||
SET citus.next_shard_id TO 360000;
|
SET citus.next_shard_id TO 360000;
|
||||||
|
|
||||||
|
-- this function is dropped in Citus10, added here for tests
|
||||||
|
CREATE OR REPLACE FUNCTION pg_catalog.master_create_distributed_table(table_name regclass,
|
||||||
|
distribution_column text,
|
||||||
|
distribution_method citus.distribution_type)
|
||||||
|
RETURNS void
|
||||||
|
LANGUAGE C STRICT
|
||||||
|
AS 'citus', $$master_create_distributed_table$$;
|
||||||
|
COMMENT ON FUNCTION pg_catalog.master_create_distributed_table(table_name regclass,
|
||||||
|
distribution_column text,
|
||||||
|
distribution_method citus.distribution_type)
|
||||||
|
IS 'define the table distribution functions';
|
||||||
|
|
||||||
|
-- this function is dropped in Citus10, added here for tests
|
||||||
|
CREATE OR REPLACE FUNCTION pg_catalog.master_create_worker_shards(table_name text, shard_count integer,
|
||||||
|
replication_factor integer DEFAULT 2)
|
||||||
|
RETURNS void
|
||||||
|
AS 'citus', $$master_create_worker_shards$$
|
||||||
|
LANGUAGE C STRICT;
|
||||||
|
|
||||||
CREATE TABLE lineitem (
|
CREATE TABLE lineitem (
|
||||||
l_orderkey bigint not null,
|
l_orderkey bigint not null,
|
||||||
l_partkey integer not null,
|
l_partkey integer not null,
|
||||||
|
|
Loading…
Reference in New Issue