I have setup a virtual IP in DC-1 and the Server-4 in datacenter-2 is configured with upstream server as the virtual ip address. After the initial set-up everything is working fine.
Then I have stopped the server-1(master) and promoted Server-2 as master. Also configured the VIP in server 2. After this, in the logs of Server-4, I am seeing the below error:
2019-02-10 21:00:25.708 PST  LOG: restarted WAL streaming at F/EC000000 on timeline 1
2019-02-10 21:00:25.840 PST  LOG: replication terminated by primary server
2019-02-10 21:00:25.840 PST  DETAIL: End of WAL reached on timeline 1 at F/EC7DD488.
2019-02-10 21:00:25.841 PST  LOG: new timeline 2 forked off current database system timeline 1 before current recovery point F/EC7DD4C0
Server-4 did not recover from this error.
After restarting the server-4, the below error is displayed:
2019-02-10 21:01:10.131 PST  FATAL: requested timeline 2 does not contain minimum recovery point F/EC7DD4C0 on timeline 1
2019-02-10 21:01:10.133 PST  LOG: startup process (PID 23920) exited with exit code 1
2019-02-10 21:01:10.133 PST  LOG: aborting startup due to startup process failure
2019-02-10 21:01:10.136 PST  LOG: database system is shut down
Any pointers appreciated.