sameersbn / docker-postgresql

Dockerfile to build a PostgreSQL container image which can be linked to other containers.
MIT License
1.05k stars 467 forks source link

Clarify documentation on master-slave setup #110

Open mbi opened 7 years ago

mbi commented 7 years ago

With 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 is 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.

Is this the recommended way of promoting a slave to a master, in case of failure of the master node? I.e.:

Thank you.