citus/src/backend/distributed/sql
Onur Tirtir d628a4c21a
Add citus_schema_move() function (#7180)
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$$;
```
2023-09-08 12:03:53 +03:00
..
datatypes/citus_cluster_clock This implements a new UDF citus_get_cluster_clock() that returns a monotonically 2022-10-28 10:15:08 -07:00
downgrades Add citus_schema_move() function (#7180) 2023-09-08 12:03:53 +03:00
udfs Add citus_schema_move() function (#7180) 2023-09-08 12:03:53 +03:00
citus--8.0-1--8.0-2.sql Strip trailing whitespace and add final newline (#3186) 2019-11-21 14:25:37 +01:00
citus--8.0-1.sql Introduce a citus_finish_citus_upgrade() function 2022-06-13 13:15:15 +02:00
citus--8.0-2--8.0-3.sql Strip trailing whitespace and add final newline (#3186) 2019-11-21 14:25:37 +01:00
citus--8.0-3--8.0-4.sql Switch to using LOCK instead of lock_relation_if_exists in TRUNCATE (#5930) 2022-05-11 18:38:48 +03:00
citus--8.0-4--8.0-5.sql Strip trailing whitespace and add final newline (#3186) 2019-11-21 14:25:37 +01:00
citus--8.0-5--8.0-6.sql Strip trailing whitespace and add final newline (#3186) 2019-11-21 14:25:37 +01:00
citus--8.0-6--8.0-7.sql Strip trailing whitespace and add final newline (#3186) 2019-11-21 14:25:37 +01:00
citus--8.0-7--8.0-8.sql Strip trailing whitespace and add final newline (#3186) 2019-11-21 14:25:37 +01:00
citus--8.0-8--8.0-9.sql Remove citus.worker_list_file & master_initialize_node_metadata 2019-11-13 00:49:58 +00:00
citus--8.0-9--8.0-10.sql Strip trailing whitespace and add final newline (#3186) 2019-11-21 14:25:37 +01:00
citus--8.0-10--8.0-11.sql Strip trailing whitespace and add final newline (#3186) 2019-11-21 14:25:37 +01:00
citus--8.0-11--8.0-12.sql Strip trailing whitespace and add final newline (#3186) 2019-11-21 14:25:37 +01:00
citus--8.0-12--8.0-13.sql Strip trailing whitespace and add final newline (#3186) 2019-11-21 14:25:37 +01:00
citus--8.0-13--8.1-1.sql Strip trailing whitespace and add final newline (#3186) 2019-11-21 14:25:37 +01:00
citus--8.1-1--8.2-1.sql Strip trailing whitespace and add final newline (#3186) 2019-11-21 14:25:37 +01:00
citus--8.2-1--8.2-2.sql Strip trailing whitespace and add final newline (#3186) 2019-11-21 14:25:37 +01:00
citus--8.2-2--8.2-3.sql Strip trailing whitespace and add final newline (#3186) 2019-11-21 14:25:37 +01:00
citus--8.2-3--8.2-4.sql Strip trailing whitespace and add final newline (#3186) 2019-11-21 14:25:37 +01:00
citus--8.2-4--8.3-1.sql Strip trailing whitespace and add final newline (#3186) 2019-11-21 14:25:37 +01:00
citus--8.3-1--9.0-1.sql Add support for TEXT SEARCH CONFIGURATION objects (#5685) 2022-02-17 13:12:46 +01:00
citus--9.0-1--9.0-2.sql Revoke usage from the citus schema 2019-10-23 00:08:17 +02:00
citus--9.0-2--9.1-1.sql Add adaptive executor support for repartition joins (#3169) 2019-12-17 19:09:45 +03:00
citus--9.1-1--9.2-1.sql Implement partitioned intermediate results. 2019-12-24 03:53:39 -08:00
citus--9.2-1--9.2-2.sql Use current user for repartition join temp schemas. 2020-02-04 09:48:20 -08:00
citus--9.2-2--9.2-4.sql Disallow C-style comments in migration files 2020-06-22 12:51:16 +03:00
citus--9.2-4--9.3-2.sql Disallow C-style comments in migration files 2020-06-22 12:51:16 +03:00
citus--9.3-1--9.2-4.sql Disallow C-style comments in migration files 2020-06-22 12:51:16 +03:00
citus--9.3-2--9.4-1.sql Implement EXPLAIN ANALYZE udfs. 2020-06-09 10:02:05 -07:00
citus--9.4-1--9.4-2.sql Fix PG upgrade scripts for 9.4 2021-07-05 13:39:28 +02:00
citus--9.4-1--9.5-1.sql create 9.5-1 udfs and update citus--9.4-1--9.5-1.sql 2020-10-15 13:50:36 +02:00
citus--9.4-2--9.4-1.sql Fix PG upgrade scripts for 9.4 2021-07-05 13:39:28 +02:00
citus--9.4-2--9.4-3.sql Fix master_update_table_statistics scripts for 9.4 2021-08-03 18:15:56 +03:00
citus--9.4-3--9.4-2.sql Fix master_update_table_statistics scripts for 9.4 2021-08-03 18:15:56 +03:00
citus--9.5-1--9.5-2.sql Fix PG upgrade scripts for 9.5 2021-07-05 13:39:35 +02:00
citus--9.5-1--10.0-4.sql Support citus_columnar as separate extension (#5911) 2022-07-13 21:08:29 -07:00
citus--9.5-2--9.5-1.sql Fix PG upgrade scripts for 9.5 2021-07-05 13:39:35 +02:00
citus--9.5-2--9.5-3.sql Fix master_update_table_statistics scripts for 9.5 2021-08-03 18:15:56 +03:00
citus--9.5-3--9.5-2.sql Fix master_update_table_statistics scripts for 9.5 2021-08-03 18:15:56 +03:00
citus--10.0-1--10.0-2.sql Support citus_columnar as separate extension (#5911) 2022-07-13 21:08:29 -07:00
citus--10.0-2--10.0-3.sql Add udf citus_get_active_worker_nodes 2021-03-17 13:15:59 +03:00
citus--10.0-3--10.0-4.sql Remove public schema dependency for 10.0 upgrades 2021-07-09 02:08:22 +03:00
citus--10.0-4--10.1-1.sql Support citus_columnar as separate extension (#5911) 2022-07-13 21:08:29 -07:00
citus--10.1-1--10.2-1.sql Support citus_columnar as separate extension (#5911) 2022-07-13 21:08:29 -07:00
citus--10.2-1--10.2-2.sql Support citus_columnar as separate extension (#5911) 2022-07-13 21:08:29 -07:00
citus--10.2-2--10.2-3.sql Support citus_columnar as separate extension (#5911) 2022-07-13 21:08:29 -07:00
citus--10.2-3--10.2-4.sql Support citus_columnar as separate extension (#5911) 2022-07-13 21:08:29 -07:00
citus--10.2-4--10.2-5.sql Fix upgrade paths for #6100 (#6176) 2022-08-17 18:56:53 +03:00
citus--10.2-5--10.2-4.sql Fix upgrade paths for #6100 (#6176) 2022-08-17 18:56:53 +03:00
citus--10.2-5--11.0-1.sql Fix upgrade paths for #6100 (#6176) 2022-08-17 18:56:53 +03:00
citus--11.0-1--11.0-2.sql Introduce a citus_finish_citus_upgrade() function 2022-06-13 13:15:15 +02:00
citus--11.0-2--11.0-3.sql Fixes a bug that prevents upgrades when there are no worker nodes 2022-06-28 15:54:49 +02:00
citus--11.0-3--11.0-4.sql Fix pg upgrade script for foreign tables (#6100) 2022-08-05 13:35:17 +03:00
citus--11.0-4--11.0-3.sql Fix upgrade paths for #6100 (#6176) 2022-08-17 18:56:53 +03:00
citus--11.0-4--11.1-1.sql Drop worker_fetch_foreign_file/worker_repartition_cleanup only if they exist when upgrading Citus (#6441) 2022-10-21 14:32:42 +03:00
citus--11.1-1--11.2-1.sql Remove shardstate from placement insert functions (#6615) 2023-01-18 09:52:38 +01:00
citus--11.2-1--11.2-2.sql Add upgrade/downgrade paths between v11.2.2 and v11.3.1 (#6820) 2023-04-06 12:46:09 +03:00
citus--11.2-2--11.3-1.sql Adds control for background task executors involving a node (#6771) 2023-04-06 14:12:39 +03:00
citus--11.3-1--11.3-2.sql Move SQL file changes for citus_shard_sizes fixes into the new 11.3-2 version (#7050) 2023-07-14 17:19:54 +03:00
citus--11.3-2--12.0-1.sql Move SQL file changes for citus_shard_sizes fixes into the new 11.3-2 version (#7050) 2023-07-14 17:19:54 +03:00
citus--12.0-1--12.1-1.sql Add citus_schema_move() function (#7180) 2023-09-08 12:03:53 +03:00