Switchover of Master and Slave roles

From: A J <s5aly(at)yahoo(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: Switchover of Master and Slave roles
Date: 2011-06-07 16:32:31
Message-ID: 693391.31715.qm@web120020.mail.ne1.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

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

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Mark Johnson 2011-06-07 16:36:19 Re: How I do Configuration for Postgresql-oracle db link?
Previous Message 최재원 2011-06-07 09:14:24 How I do Configuration for Postgresql-oracle db link?