doc: add manual switchover recipe

This commit is contained in:
Simone Gotti 2017-06-08 11:15:11 +02:00
parent b4b15e92a5
commit 473bbe3009
2 changed files with 21 additions and 8 deletions

View File

@ -5,13 +5,19 @@
* [Setting instance parameters](postgres_parameters.md)
* [Stolon Client](stolonctl.md)
* Backup/Restore
* [Point In Time Recovery](pitr.md)
* [Point In Time Recovery](pitr.md)
* [Point In Time Recovery with wal-e](pitr_wal-e.md)
* [Standby Cluster](standbycluster.md)
* Examples
* [Simple test cluster](simplecluster.md)
* [Kubernetes](../examples/kubernetes/README.md)
* Misc topics
* [Enabling pg_rewind](pg_rewind.md)
* [Enabling synchronous replication](syncrepl.md)
* [FAQ](faq.md)
### Misc topics
* [Enabling pg_rewind](pg_rewind.md)
* [Enabling synchronous replication](syncrepl.md)
### Recipes
* [Manual switchover without transactions loss](manual_switchover.md)
### Examples
* [Simple test cluster](simplecluster.md)
* [Kubernetes](../examples/kubernetes/README.md)
### [FAQ](faq.md)

7
doc/manual_switchover.md Normal file
View File

@ -0,0 +1,7 @@
# Manual switch master without losing any transaction
If for any reason (eg. maintenance) you want to switch the current master to another one without losing any transaction you can do this in these ways:
* If you've synchronous replication enabled you can just stop the current master keeper, one of the synchronous standbys will be elected as the new master.
* If you aren't using synchronous replication you can just temporarily enable it (see [here](syncrepl.md)), wait that the cluster reconfigures some synchronous standbys (you can monitor `pg_stat_replication` for a standby with `sync_state` = `sync`) and then stop the master keeper, wait for a new synchronous standby to be elected and disable synchronous replication.