pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Matt Chesler <matt@pragmatrading.com>
To: pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>
Subject: Problem with Streaming Replication/Hot Standby
Date: Mon, 25 Oct 2010 15:11:48 -0400
Message-ID: <1DF79634-7684-4A2E-8267-22D7A5738ECF@pragmatrading.com> (raw)

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



Message-ID: <1DF79634-7684-4A2E-8267-22D7A5738ECF@pragmatrading.com>
Permalink:  ../1DF79634-7684-4A2E-8267-22D7A5738ECF@pragmatrading.com/
Also on:    postgresql.org/message-id/1DF79634-7684-4A2E-8267-22D7A5738ECF@pragmatrading.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: matt@pragmatrading.com
  Subject: Re: Problem with Streaming Replication/Hot Standby
  In-Reply-To: <1DF79634-7684-4A2E-8267-22D7A5738ECF@pragmatrading.com>
  References: <1DF79634-7684-4A2E-8267-22D7A5738ECF@pragmatrading.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox