Skip to content

Instantly share code, notes, and snippets.

View thruflo's full-sized avatar

James Arthur thruflo

View GitHub Profile
marcocitus / cluster-setup.sql
Last active September 7, 2022 14:27
Basic geo-partitioning for Citus
-- set up a global cluster
select citus_set_coordinator_host('us-coordinator-hostname', 5432);
select citus_add_node('us-worker1-hostname', 5432);
select citus_add_node('us-worker2-hostname', 5432);
select citus_add_node('eu-coordinator-hostname', 5432);
select citus_add_node('eu-worker1-hostname', 5432);
select citus_add_node('eu-worker2-hostname', 5432);
-- make sure we can run distributed queries on EU coordinator
select start_metadata_sync_to_node('eu-coordinator-hostname', 5432);