Re: Weird error when setting up streaming replication

From: pgdude <pgdude(at)pgdude(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Weird error when setting up streaming replication
Date: 2014-06-24 16:04:45
Message-ID: 1403625885321-5808923.post@n5.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I get the same "weird" errors (WAL file is from different database system)
too with Ubuntu and Postgresql 9.3 when setting up a slave using rsync.

1. I installed postgresql on the slave (which automatically does the
initdb):
sudo apt-get install postgresql-9.3

2. Modified my postgresql.conf file
(/etc/postgresql/9.3/main/postgresql.conf) to make it a slave. Did the same
thing for pg_hba.conf adding my replication user in there.

3. Stopped both master and slave.

4. Did the rsync from the master to the slave excluding pg_xlog (thereby
leaving the existing pg_xlog contents on the slave intact).

Then I get the same errors (WAL file is from different database system).

Now if I delete everything from the data directory on the slave, including
the pg_xlog directory, and then do the rsync excluding the pg_xlog
directory, the cluster won't start because the pg_xlog directory is not
there.

But if I rsync with the pg_xlog directory, then I do not get any more
messages in the log file, whether I had the installation data directory in
place, or I deleted everything from the data directory before the rsync.

So it seems in this version of Postgresql 9.3 on Ubuntu, you should NOT
exclude pg_xlog when rsyncin' the stuff over.

--
View this message in context: http://postgresql.1045698.n5.nabble.com/Weird-error-when-setting-up-streaming-replication-tp5766888p5808923.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Altec103 2014-06-24 17:47:37 Error When Trying to Use Npgsql to COPY into a PostgreSQL Database
Previous Message Merlin Moncure 2014-06-24 15:37:22 Re: if row has property X, find all rows that has property X