PSQL_MODE config parameter renamed to REPLICATION_MODE

This commit is contained in:
Sameer Naik
2015-11-26 21:03:51 +05:30
parent de5295ffa7
commit b6f0cba6a7
3 changed files with 12 additions and 10 deletions
+4 -4
View File
@@ -168,15 +168,15 @@ host all all samenet trust
# Creating a Snapshot or Slave Database
You may use the `PSQL_MODE` variable along with `REPLICATION_HOST`, `REPLICATION_PORT`, `REPLICATION_USER` and `REPLICATION_PASS` to create a snapshot of an existing database and enable stream replication.
You may use the `REPLICATION_MODE` variable along with `REPLICATION_HOST`, `REPLICATION_PORT`, `REPLICATION_USER` and `REPLICATION_PASS` to create a snapshot of an existing database and enable stream replication.
Your master database must support replication or super-user access for the credentials you specify. The `PSQL_MODE` variable should be set to `master`, for replication on your master node and `slave` or `snapshot` respectively for streaming replication or a point-in-time snapshot of a running instance.
Your master database must support replication or super-user access for the credentials you specify. The `REPLICATION_MODE` variable should be set to `master`, for replication on your master node and `slave` or `snapshot` respectively for streaming replication or a point-in-time snapshot of a running instance.
Create a master instance
```bash
docker run --name='psql-master' -it --rm \
-e 'PSQL_MODE=master' -e 'PG_TRUST_LOCALNET=true' \
-e 'REPLICATION_MODE=master' -e 'PG_TRUST_LOCALNET=true' \
-e 'REPLICATION_USER=replicator' -e 'REPLICATION_PASS=replicatorpass' \
-e 'DB_NAME=dbname' -e 'DB_USER=dbuser' -e 'DB_PASS=dbpass' \
sameersbn/postgresql:9.4-8
@@ -187,7 +187,7 @@ Create a streaming replication instance
```bash
docker run --name='psql-slave' -it --rm \
--link psql-master:psql-master \
-e 'PSQL_MODE=slave' -e 'PG_TRUST_LOCALNET=true' \
-e 'REPLICATION_MODE=slave' -e 'PG_TRUST_LOCALNET=true' \
-e 'REPLICATION_HOST=psql-master' -e 'REPLICATION_PORT=5432' \
-e 'REPLICATION_USER=replicator' -e 'REPLICATION_PASS=replicatorpass' \
sameersbn/postgresql:9.4-8