Обсуждение: Problem with Streaming Replication/Hot Standby

Поиск
Список
Период
Сортировка

Problem with Streaming Replication/Hot Standby

От
Matt Chesler
Дата:
I'm trying to get started with Streaming Replication and Hot Standby using PostgreSQL 9.0 (9.0.0-1PGDG.el5 installed
fromPGDG). 

I've followed the instructions at
http://wiki.postgresql.org/wiki/Binary_Replication_Tutorial#Binary_Replication_in_6_Stepsusing two fresh databases, but
I'mnot having any success.  When I initially start up the standby server, I see the following entries in the log, which
areexpected 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
seethe 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'mdoing wrong?  I've read through all of the documentation I've been able to find (see below), and I have not been
ableto 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