Created
March 22, 2017 00:37
-
-
Save begriffs/938e762145395bcbbe7891ef564efdc3 to your computer and use it in GitHub Desktop.
Quick single-machine cluster
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pg_dropcluster --stop 9.6 main | |
| alias forall="echo -n 'master worker1 worker2' | xargs -d ' ' -n 1 -I '{}'" | |
| forall pg_createcluster --locale en_US.UTF-8 --start 9.6 {} | |
| forall pg_conftool 9.6 {} set shared_preload_libraries citus | |
| forall pg_conftool 9.6 {} set listen_addresses '*' | |
| forall pg_ctlcluster 9.6 {} restart | |
| forall psql --cluster 9.6/{} -c "CREATE EXTENSION citus;" | |
| psql -c "SELECT * from master_add_node('localhost', 5433);" | |
| psql -c "SELECT * from master_add_node('localhost', 5434);" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment