timeline X of the primary does not match recovery target timeline Y

From: Adam Tistler <atistler(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: timeline X of the primary does not match recovery target timeline Y
Date: 2011-09-26 12:54:43
Message-ID: 34F74A50-6132-4603-8133-447B2AEF9953@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-general

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.

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Davenport, Julie 2011-09-26 14:16:14 problems logging in through phpPgAdmin
Previous Message Burgholzer, Robert (DEQ) 2011-09-26 12:20:11 Re: diagnosing a db crash - server exit code 2

Browse pgsql-general by date

  From Date Subject
Next Message Gregg Jaskiewicz 2011-09-26 13:01:12 Re: Does postgresql 9.0.4 use index on PREFIX%SUFFIX queries?
Previous Message Venkat Balaji 2011-09-26 12:49:50 Re: : PostgreSQL Online Backup