From d33c6983733ab4f1a4ccf0f1587f7ff4018d0151 Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Tue, 22 Aug 2017 17:14:41 +0200 Subject: [PATCH] better workflow to init cluster --- README.md | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 3e787b3..c03bbb3 100644 --- a/README.md +++ b/README.md @@ -11,15 +11,6 @@ Hardware configuration is 3 nodes: 10.200.1.61 edozvola-db-01 10.200.1.62 edozvola-db-02 -If installing on existing streaming replication you will need to tell pgpool where current master is with: - -echo 0 > /tmp/postgres_master - -You can also force re-check of nodes by removing status file and restarting pgool: - -rm /var/log/pgpool_status -systemctl restart pgpool - Deployment script ./t/0-init-cluster.sh assumes that machine from which it's run is 10.200.1.1 which is added in pg_hba.conf as authorized to be able to deploy cluster. You can run it with: @@ -27,7 +18,11 @@ make init This will destroy all databases on all nodes, archive logs, etc, so don't do this if you need your old data later. -You can also edit all local files and push them to all nodes using: +On the other hand this will also create setup whole cluster, and you can examine it's status using: + +make + +If you edited local files, push changes to all nodes using: make push @@ -35,6 +30,21 @@ To restart all services (pgoool and postgresql) do: make restart +If you want to see systemd status of pgpool and replication just type: + +make status + + + +If installing on existing streaming replication you will need to tell pgpool where current master is with: + +echo 0 > /tmp/postgres_master + +You can also force re-check of nodes by removing status file and restarting pgool: + +rm /var/log/pgpool_status +systemctl restart pgpool + Requirements ============ -- 2.20.1