mirror of https://github.com/citusdata/citus.git
Add citus_schema_move() that can be used to move tenant tables within a distributed schema to another node. The function has two variations as simple wrappers around citus_move_shard_placement() and citus_move_shard_placement_with_nodeid() respectively. They pick a shard that belongs to the given tenant schema and resolve the source node that contain the shards under given tenant schema. Hence their signatures are quite similar to underlying functions: ```sql -- citus_schema_move(), using target node name and node port CREATE OR REPLACE FUNCTION pg_catalog.citus_schema_move( schema_id regnamespace, target_node_name text, target_node_port integer, shard_transfer_mode citus.shard_transfer_mode default 'auto') RETURNS void LANGUAGE C STRICT AS 'MODULE_PATHNAME', $$citus_schema_move$$; -- citus_schema_move(), using target node id CREATE OR REPLACE FUNCTION pg_catalog.citus_schema_move( schema_id regnamespace, target_node_id integer, shard_transfer_mode citus.shard_transfer_mode default 'auto') RETURNS void LANGUAGE C STRICT AS 'MODULE_PATHNAME', $$citus_schema_move_with_nodeid$$; ``` |
||
---|---|---|
.. | ||
columnar | ||
distributed | ||
.gitignore | ||
citus_config.h.in | ||
citus_version.h.in | ||
pg_version_compat.h |