PSA: Machine migration has started again

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:

  1. Scale the cluster up to 3 machines (I had two previously)
  2. Take a database backup offsite
  3. 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.
  4. The failover began and allocated one of the recently migrated machines to be the leader.
  5. I stopped the old server (non migrated one)
  6. 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.

1 Like