Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 7FC88B5DBCA for ; Tue, 27 Sep 2011 14:15:51 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 72309-04 for ; Tue, 27 Sep 2011 17:15:44 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0-rc2 Received: from mail-qy0-f181.google.com (mail-qy0-f181.google.com [209.85.216.181]) by mail.postgresql.org (Postfix) with ESMTP id A8C9EB5DBCD for ; Tue, 27 Sep 2011 14:15:43 -0300 (ADT) Received: by qyk7 with SMTP id 7so8143290qyk.19 for ; Tue, 27 Sep 2011 10:15:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; bh=VinVXigtBYirD1mZHV786AUUNCyccgPTfOK3GIRHBUo=; b=nnQJyllgcItfrHA1D4MpGrJxpyZlcHe7aI+mcjmgNBGzIPtNtgbGTb3rvJqrL38kZs Jm6n0FntV5dpaCeFdHOVwSsg8sCWU4W7PrfJiMRl8b5zSLIgKaS04o2z3J4ilCg1aTJU WpP2NZazHInBd2p+8z6XAv55/kN82MkCQT6eY= Received: by 10.224.213.135 with SMTP id gw7mr6288760qab.190.1317143742743; Tue, 27 Sep 2011 10:15:42 -0700 (PDT) Received: from [192.168.5.201] (ip-64-134-242-89.public.wayport.net. [64.134.242.89]) by mx.google.com with ESMTPS id f15sm20035219qac.9.2011.09.27.10.15.40 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 27 Sep 2011 10:15:42 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Apple Message framework v1244.3) Subject: timeline X of the primary does not match recovery target timeline Y From: Adam Tistler In-Reply-To: <6AD97447-693E-4C55-BC18-A5C67D166150@gmail.com> Date: Tue, 27 Sep 2011 13:15:36 -0400 Content-Transfer-Encoding: quoted-printable Message-Id: <94C064C9-34EF-49B3-BACF-33C67D9A5B1D@gmail.com> References: <34F74A50-6132-4603-8133-447B2AEF9953@gmail.com> <6AD97447-693E-4C55-BC18-A5C67D166150@gmail.com> To: pgsql-admin@postgresql.org X-Mailer: Apple Mail (2.1244.3) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.889 tagged_above=-10 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001, T_TO_NO_BRKTS_FREEMAIL=0.01 X-Spam-Level: X-Archive-Number: 201109/203 X-Sequence-Number: 38440 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 =3D 5 wal_keep_segments =3D 32 checkpoint_segments =3D 8 wal_level =3D hot_standby on slave: recovery.conf standby_mode =3D on primary_conninfo =3D 'host=3D172.16.135.205 port=3D5432 user=3Dreplicator = password=3Dreplicator' trigger_file =3D '/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.