From ce64f227793a25ecab9fef94a8197c76e6f89fe2 Mon Sep 17 00:00:00 2001 From: Sameer Naik Date: Sat, 28 Nov 2015 22:21:17 +0530 Subject: [PATCH] readme: slave can be restarted to continue as a regular read/write instance --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 323b3e3..fa31b43 100644 --- a/README.md +++ b/README.md @@ -233,6 +233,7 @@ docker run --name postgresql-slave01 -itd --restart always \ > - The default value of `REPLICATION_PORT` is `5432` > - The default value of `REPLICATION_SSLMODE` is `prefer` > - The value of `REPLICATION_USER` and `REPLICATION_PASS` should be the same as the ones specified on the master node. +> - With [persistence](#persistence) in use, if the container is stopped and started, for the container continue to function as a slave you need to ensure that `REPLICATION_MODE=slave` defined in the containers environment. In the absense of which the slave configuration will be turned off and the node will allow writing to it while having the last synced data from the master. And just like that with minimal effort you have a PostgreSQL replication cluster setup. You can create additional slaves to scale the cluster horizontally.