Skip to content

Instantly share code, notes, and snippets.

@lichti
Last active April 20, 2017 15:21
Show Gist options
  • Save lichti/2e6b666a1a9c81f9dc6cc04cf6b6d789 to your computer and use it in GitHub Desktop.
Save lichti/2e6b666a1a9c81f9dc6cc04cf6b6d789 to your computer and use it in GitHub Desktop.
CitusData Notes

Citus Docs

Multi-node install

Steps to be executed on all nodes

curl https://install.citusdata.com/community/deb.sh | sudo bash
sudo apt-get -y install postgresql-9.6-citus-6.1
sudo pg_conftool 9.6 main set shared_preload_libraries citus
sudo pg_conftool 9.6 main set listen_addresses '*'
echo "host    all             all             10.0.1.0/24              trust" | sudo tee -a /etc/postgresql/9.6/main/pg_hba.conf
sudo service postgresql restart
sudo update-rc.d postgresql enable
sudo -i -u postgres psql -c "CREATE EXTENSION citus;"

Steps to be executed on the master node

sudo -i -u postgres psql -c "SELECT * from master_add_node('10.0.1.7', 5432);"
sudo -i -u postgres psql -c "SELECT * from master_add_node('10.0.1.6', 5432);"
sudo -i -u postgres psql -c "SELECT * FROM master_get_active_worker_nodes();"
sudo -i -u postgres psql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment