Recovery from Primary failure
If the Primary server fails, execute the following steps on the Standby node:
- Take standby Postgres service down. (Postgresql-X64-14).
- On Standby Node – Move C:\Program Files\Postgresql\14\Data\Postgresql.conf, Pg_Hba.conf, Recovery.conf to C:\Program Files\Postgresql\14\Standby_Bkp.
- Copy C:\Program Files\Postgresql\14\Primary_Bkp\Postgres.Sql, Pg_Hba files From Primary_Bkp folder which are backup file from Primary Node.
- Start Standby Node Postgresql-X64-14 Service.
- Check recovery Status: Select pg_is _in_recovery. If it is “t” it is in read-only mode and if it is “f” it is in read-write mode. It should show status “f”.
- Start ActiveMQ service on secondary server.
- Start Tomcat service on secondary server and agents of DR site.
- Assign all workflows to respective agents.