Add initial docs for PostgreSQL replication
Document how to switch the PostgreSQL primary server to a standby, for the case where the primary goes down. Refs #217
This commit is contained in:
parent
4be542670b
commit
0b63bc954f
14
doc/postgresql_replication.md
Normal file
14
doc/postgresql_replication.md
Normal file
@ -0,0 +1,14 @@
|
||||
# Switch PostgreSQL primary
|
||||
|
||||
Change the role in `./nodes/#{new_primary}.json`'s run list:
|
||||
|
||||
- "role[postgresql_replica]",
|
||||
+ "role[postgresql_primary]",
|
||||
|
||||
Delete the `role[postgresql_replica]` role from the old primary's run list.
|
||||
|
||||
Run Chef on the new primary, then create the failover file to turn the server into the new primary:
|
||||
|
||||
$ sudo touch /mnt/data/postgresql/failover.trigger
|
||||
|
||||
Run Chef on servers that use PostgreSQL to change the IP of the primary server.
|
Loading…
x
Reference in New Issue
Block a user