Skip site navigation (1) Skip section navigation (2)

Problem with Streaming Replication/Hot Standby

From: Matt Chesler <matt(at)pragmatrading(dot)com>
To: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Problem with Streaming Replication/Hot Standby
Date: 2010-10-25 19:11:48
Message-ID: 1DF79634-7684-4A2E-8267-22D7A5738ECF@pragmatrading.com (view raw or flat)
Thread:
Lists: pgsql-admin
I'm trying to get started with Streaming Replication and Hot Standby using PostgreSQL 9.0 (9.0.0-1PGDG.el5 installed from PGDG).

I've followed the instructions at http://wiki.postgresql.org/wiki/Binary_Replication_Tutorial#Binary_Replication_in_6_Steps using two fresh databases, but I'm not having any success.  When I initially start up the standby server, I see the following entries in the log, which are expected since the primary is not yet running:

FATAL:  could not connect to the primary server: could not connect to server: Connection refused
                Is the server running on host "database1.example.com" and accepting
                TCP/IP connections on port 5432?

This message repeats indefinitely until I start the primary server.  Once I start the postgres server on the primary, I see the following message in the standby's log:

LOG:  streaming replication successfully connected to primary
FATAL:  could not receive data from WAL stream: FATAL:  requested WAL segment 000000010000000000000000 has already been removed

On the primary, I see the following entries in the log:

LOG:  replication connection authorized: user=postgres host=10.1.2.13 port=60977
FATAL:  requested WAL segment 000000010000000000000000 has already been removed

If I look in the pg_xlog directory, the file mentioned is very clearly still present.  Can someone please explain what I'm doing wrong?  I've read through all of the documentation I've been able to find (see below), and I have not been able to make any progress.  Any assistance is greatly appreciated.

http://wiki.postgresql.org/wiki/Hot_Standby
http://wiki.postgresql.org/wiki/Binary_Replication_Tutorial
http://wiki.postgresql.org/wiki/Streaming_Replication

Disclaimer: http://pragmatrading.com/disclaimer.html

pgsql-admin by date

Next:From: Tom LaneDate: 2010-10-25 19:57:10
Subject: Re: autovacuum launcher process eating up 17G+ of ram?
Previous:From: Kevin GrittnerDate: 2010-10-25 17:31:59
Subject: Re: autovacuum launcher process eating up 17G+ of ram?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group