pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adam Tistler <atistler@gmail.com>
To: pgsql-admin@postgresql.org
Subject: timeline X of the primary does not match recovery target timeline Y
Date: Tue, 27 Sep 2011 13:15:36 -0400
Message-ID: <94C064C9-34EF-49B3-BACF-33C67D9A5B1D@gmail.com> (raw)
In-Reply-To: <6AD97447-693E-4C55-BC18-A5C67D166150@gmail.com>
References: <34F74A50-6132-4603-8133-447B2AEF9953@gmail.com>
	<6AD97447-693E-4C55-BC18-A5C67D166150@gmail.com>


I am trying to set up master/slave warm standby streaming replication (9.1).  I am not doing archiving/log shipping.  I have read that you cannot reverse roles between the master and slave, and that once a slave is "promoted", you need to use  pg_basebackup or rsync to copy files from the newly promoted master to the old master.  I am fine with this, however, in my case all I am trying to do is re-enable the slave to be in recovery mode. I am doing this by deleting the trigger file ( which I had originally created to promote the slave to master ) and moving recovery.done to recovery.conf, then restarting postgres.  As a result I get the following error:

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

Relevant info:

on master: postgresql.conf

max_wal_senders = 5
wal_keep_segments = 32
checkpoint_segments = 8
wal_level = hot_standby

on slave: recovery.conf

standby_mode = on
primary_conninfo = 'host=172.16.135.205 port=5432 user=replicator password=replicator'
trigger_file = '/tmp/pgsql.trigger'

everything in postgresql.conf on the slave is default related to replication.




On a side note I am slightly confused as to why someone would use "archive mode/restore_command" in combination with streaming replication.  As I stated above, I am not archiving/restoring on either the master or slave, I am simply relying on streaming replication.... is this the wrong approach??




Thanks in advance for the help.





view thread (5+ messages)  latest in thread

Message-ID: <94C064C9-34EF-49B3-BACF-33C67D9A5B1D@gmail.com>
Permalink:  ../94C064C9-34EF-49B3-BACF-33C67D9A5B1D@gmail.com/
Also on:    postgresql.org/message-id/94C064C9-34EF-49B3-BACF-33C67D9A5B1D@gmail.com

 · 

reply

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: atistler@gmail.com
  Subject: Re: timeline X of the primary does not match recovery target timeline Y
  In-Reply-To: <94C064C9-34EF-49B3-BACF-33C67D9A5B1D@gmail.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