Re: While converting the Master to Standby , FATAL: timeline 2 of the primary does not match recovery target timeline 1

From: Greg Smith <greg(at)2ndQuadrant(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: While converting the Master to Standby , FATAL: timeline 2 of the primary does not match recovery target timeline 1
Date: 2011-06-18 17:12:34
Message-ID: 4DFCDC82.8040901@2ndQuadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 06/18/2011 05:22 AM, Nithya Rajendran wrote:
>
>
> We are doing Master/Standby setup, We unplugged the master server,
> then the standby server became the master (by creating trigger file).
>
> While converting the old master to new slave server, We are getting
> the following error in old master,
>
>

You can't make a system that used to be in the replication set join it
again the way you're trying to do. The timeline feature you're seeing
errors from is there to keep you from making mistakes like this.

Even though this system used to be the master, it still needs to go
through the full procedure for creating a new standby: start a backup,
sync all the files from the master, send new archive WAL data over. The
fact that this used to be the master doesn't change that.

If the database is large, it may be worthwhile to use rsync and features
such as its "--inplace" feature to make the copy from new master -> old
master faster. Since it has older copies of the files, the copy can go
faster than one to an empty system would take. But you can't just
convert the old master to be a standby of a new master.

--
Greg Smith 2ndQuadrant US greg(at)2ndQuadrant(dot)com Baltimore, MD
PostgreSQL Training, Services, and 24x7 Support www.2ndQuadrant.us
"PostgreSQL 9.0 High Performance": http://www.2ndQuadrant.com/books

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Frank Miles 2011-06-18 20:50:44 Re: set returning function with variable argument - possible?
Previous Message Scott Ribe 2011-06-18 14:28:39 Re: 2 questions re RAID