Re: Weird error when setting up streaming replication - Mailing list pgsql-general

From Jeff Janes
Subject Re: Weird error when setting up streaming replication
Date
Msg-id CAMkU=1y-Yxi9TKHdBLgOGUMYfHzwvOD_ENhLoXD41TDwH+VuTA@mail.gmail.com
Whole thread Raw
In response to Re: Weird error when setting up streaming replication  (Quentin Hartman <qhartman@direwolfdigital.com>)
List pgsql-general
On Fri, Aug 9, 2013 at 9:54 AM, Quentin Hartman
<qhartman@direwolfdigital.com> wrote:
> OK, figured this out. I had it start copying the pg_xlog directory as well
> when doing the initial sync. I realized this is also the first time I've
> setup replication from scratch using 9.2. All my other 9.2 pairs were setup
> on either 9.0 or 9.1, and have been upgraded from there with replication
> already in place. Previously, and still according to that article in the
> wiki, the pg_xlog directory was specifically excluded.

You exclude the pg_xlog in the rsync so as not to restore them,
because they are not needed and can cause confusion.  But, you don't
want an old copy of pg_xlog from a previous cluster sitting around,
either, which is the case you were having.

By including pg_xlog in the sync, what you were doing is overwriting
the old files from a previous cluster (which are toxic) with ones from
the master, which are useless, but at least not generally toxic.

I think one problem from the wiki is step 3:

3. Edit recovery.conf and postgresql.conf on the standby to start up
replication and hot standby. First, in postgresql.conf, change this
line

It doesn't tell you how you got those files in the first place, in
order to edit them.  You apparently got them from an initdb.  What you
probably want to do instead is get them by copying them from the
master.

> Does anyone know why
> this behavior may have changed?

I don't think it has changed.  I think you are interpretation of the
instructions has changed, so you did something different under 9.0 and
9.1.

Cheers,

Jeff


pgsql-general by date:

Previous
From: Olivier Chaussavoine
Date:
Subject: earthdistance
Next
From: "ciifrancesco@tiscali.it"
Date:
Subject: c++ convert wchar_t to UTF-8 for DB