Обсуждение: While converting the Master to Standby , FATAL: timeline 2 of the primary does not match recovery target timeline 1

Поиск
Список
Период
Сортировка

Hi,

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,

 

FATAL:  the database system is starting up

FATAL:  the database system is starting up

FATAL:  timeline 2 of the primary does not match recovery target timeline 1

FATAL:  the database system is starting up

FATAL:  the database system is starting up

 

In new Master Machine the log is as follows,

 

LOG:  selected new timeline ID: 2

LOG:  archive recovery complete

LOG:  database system is ready to accept connections

LOG:  autovacuum launcher started

LOG:  unexpected EOF on client connection

 

Could anyone please help on this issue.

 

Thanks and Regards

Nithya R



::DISCLAIMER::
-----------------------------------------------------------------------------------------------------------------------

The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only.
It shall not attach any liability on the originator or HCL or its affiliates. Any views or opinions presented in
this email are solely those of the author and may not necessarily reflect the opinions of HCL or its affiliates.
Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of
this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have
received this email in error please delete it and notify the sender immediately. Before opening any mail and
attachments please check them for viruses and defect.

-----------------------------------------------------------------------------------------------------------------------
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@2ndQuadrant.com   Baltimore, MD
PostgreSQL Training, Services, and 24x7 Support  www.2ndQuadrant.us
"PostgreSQL 9.0 High Performance": http://www.2ndQuadrant.com/books