jeudi 4 décembre 2014

migrate standalone postgresql database cluster to high availability cluster


We have tested one setup of postgres HA with repmgr and pgpool. It is working fine and now we have to migrate our existing database to the HA setup. We have two approaches,



  1. Make the HA master as slave for the existing database and sync. Once it is done, then sync with HA slaves and make it as a master; start the HA. Redirect the application to the HA cluster. This approach is to avoid downtime

  2. Take downtime and initiate a full backup in the current database cluster. Restore it to the HA setup and then redirect application to the HA setup. But for this we need to remove our app servers from load balancer pool and again add it back and it can cause more downtime than expected.


So which you would consider as the best and safe approach and why the other is not safe to do ?





Aucun commentaire:

Enregistrer un commentaire