Table of Contents

Coordinator node may be replicated using STREAMING REPLICATION

Start replication

Set replication factor before start

SET citus.shard_replication_factor = 2;
SET citus.shard_count = 2;

Set shard distributed table

SELECT create_distributed_table('tablename', 'id');
SELECT truncate_local_data_after_distributing_table($$public.tablename$$);

or Copy table to all nodes

SELECT create_reference_table('tablename');


Show connected workers

SELECT * FROM citus_get_active_worker_nodes();

Rebalance table

SELECT rebalance_table_shards('tablename');

Drain node

SELECT citus_drain_node('coordinator01',5432);

Basic status

SELECT * FROM citus_shards;
SELECT * FROM citus_tables;