Re: WAL archiving to 2 standby servers

From: Jerry Sievers <gsievers19(at)comcast(dot)net>
To: John Scalia <jayknowsunix(at)gmail(dot)com>
Cc: "pgsql-admin\(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: WAL archiving to 2 standby servers
Date: 2014-07-02 18:30:59
Message-ID: 86ionfmx3w.fsf@jerry.enova.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

John Scalia <jayknowsunix(at)gmail(dot)com> writes:

> Hi all,
>
> I'm wondering as I've never seen anyone doing this if I can/should
> setup WAL archiving from the primary server to 2 different standby
> servers. These machines are configured to be streaming replication and
> I've got the archive command on the primary doing an scp to both
> standbys, but for some reason the second one isn't getting
> anything. What the archive_command looks like is "scp %p
> user(at)standby1:/<dir>/%f; scp %p user(at)standby2:<dir>/%f". That's not
> wokring correctly, but I'm wondering if it's even necessary for the
> 2nd standby?

Look in your server log for errors on the 2nd scp.

Also check your $PGDATA/pg_xlog/archive_status directory for a pile-up
of *.ready files.

If your archive command isn't fully operational and is returning
non-zero to the caller, then Pg thinks archiving is failing and will
*not* recycle the related xlog files.

I'd suggest also you get on the server box as user postgres and make
sure you can manually ssh without being prompted for a password and/or
asked to verify host keys... fix mismatching lines in ~/.ssh/known_hosts
file etc.

As for whether or not you should be sending WALs to both instances, it
depends on what you need to accomplish.

HTH

>
> Just askin',
> Jay
>
> PS. There are two standby's to deal with the problem of synchronous_commit and the failure of one of the standby's.

--
Jerry Sievers
Postgres DBA/Development Consulting
e: postgres(dot)consulting(at)comcast(dot)net
p: 312.241.7800

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Kevin Grittner 2014-07-02 19:13:28 Re: WAL archiving to 2 standby servers
Previous Message John Scalia 2014-07-02 17:28:49 WAL archiving to 2 standby servers