From: A J <s5aly@yahoo.com>
To: pgsql-admin@postgresql.org
Subject: Switchover of Master and Slave roles
Date: Tue, 7 Jun 2011 09:32:31 -0700 (PDT)
Message-ID: <693391.31715.qm@web120020.mail.ne1.yahoo.com> (raw)
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: s5aly@yahoo.com
Subject: Re: Switchover of Master and Slave roles
In-Reply-To: <693391.31715.qm@web120020.mail.ne1.yahoo.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox