Ok I just migrated my old Stolon Postgres database manually to try and avoid any issues when the automatic migration came through. I had a read replica in my cluster that was already migrated but my leader wasn’t. So I needed to force the leader to change.
Here’s what I did:
- Scale the cluster up to 3 machines (I had two previously)
- Take a database backup offsite
- Ssh into your master and follow this guide - What is the correct process to change the postgres leader region? - #2 by shaun . I followed the
stolonctl
commands. - The failover began and allocated one of the recently migrated machines to be the leader.
- I stopped the old server (non migrated one)
- Waited for the new replica to become healthy
Everything worked out there was ~20 minutes of downtime, this is dependent on your volume size. At first I didn’t turn off the previous leader and the replica sync failed.