Re: Minimal streaming replication - Mailing list pgsql-general

From Stuart Bishop
Subject Re: Minimal streaming replication
Date
Msg-id CADmi=6OGudLzU85Gq9SAh57k22zpm2goX-v+YwtN72hq7k2ZaQ@mail.gmail.com
Whole thread Raw
In response to Minimal streaming replication  (Steve Crawford <scrawford@pinpointresearch.com>)
Responses Re: Minimal streaming replication
List pgsql-general
On Tue, Jun 26, 2012 at 6:47 AM, Steve Crawford
<scrawford@pinpointresearch.com> wrote:

> The documentation says "To use streaming replication, set up a file-based
> log-shipping standby server as described in Section 25.2...." however I'm
> not using any of the archive or restore commands but instead use
> pg_basebackup to do the initial copy in a script that at its core runs
> pg_basebackup then starts the standby server. So...
>
> Given a sufficiently large wal_keep_segments on the master is this a
> reasonable approach?

Its what I've setup and seems to be working fine.

> Is there a disadvantage, other than disk-space required, to having
> wal_keep_segments set to a fairly large number, say 256 or 512?

I set mine to 5000.


> However I'm seeing troubling messages in the log. While running pgbench I
> see the following types of messages on the master every minute or few:

> 2012-06-25 11:36:26 PDT FATAL:  could not send data to WAL stream: SSL
> error: sslv3 alert unexpected message
> 2012-06-25 11:36:26 PDT LOG:  invalid magic number 0000 in log file 457,
> segment 173, offset 15851520
> ...
> 2012-06-25 11:36:41 PDT LOG:  streaming replication successfully connected
> to primary
> ...
>
> Any advice on what this is telling me? I'm not keen on words like "FATAL" in
> my logs.

I saw this with Ubuntu 12.04 and PostgreSQL 9.1.4, replicating to an
identical machine. Google suggested it was caused by different
versions of libssl, but I don't think that is the case here unless one
of the packages got statically linked with an old libssl. I haven't
had time to investigate so I've disabled SSL for now, even though
replication appears to work apart from the disconnections.

--
Stuart Bishop <stuart@stuartbishop.net>
http://www.stuartbishop.net/

pgsql-general by date:

Previous
From: Stuart Bishop
Date:
Subject: Re: Calculating Replication Lag - units
Next
From: Tom Lane
Date:
Subject: Re: txid and current_timestamp