Hello,
I am trying to switch the master and slave roles in a test I am doing with streaming replication in 9.1 beta.
To start with, I have one master (N1 node) and one slave (N2 node).
I stop N1 and promote N2 as primary (by touching the trigger file).
Now I wish for N1 to come back up as slave of N2. How should I do that ?
I tried creating a recovery.conf in N1's directory, along with cleaning up its pg_xlog and pg_log.
But when I start N1 and try to connect to it, I get the message:
psql: FATAL: the database system is starting up
And the log file of N1 says:
FATAL: timeline 2 of the primary does not match
recovery target timeline 1
Any ideas on what could I be missing ?
Thanks,
AJ