Now when I do 'kill -9 $(pidof postmaster)' The witness detects that something went wrong and fails over from node1 to node2
But when I setup the replication now to work from node2 to node1 and I kill the postgresql process it doesn't failover and the repmgrd log shows the following message:
unable to determine a valid master server; waiting 10 seconds to retry...
it seems that the witness doesn't know about the new standby server..
Has anyone got any idea about what am I doing wrong here?