Re: warm standby with WAL shipping

From: Greg Smith <gsmith(at)gregsmith(dot)com>
To: Geoffrey <lists(at)serioustechnology(dot)com>
Cc: jd(at)commandprompt(dot)com, Erik Jones <ejones(at)engineyard(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: warm standby with WAL shipping
Date: 2009-06-03 19:26:17
Message-ID: alpine.GSO.2.01.0906031514380.26714@westnet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, 3 Jun 2009, Geoffrey wrote:

> My assumption was that since pg_standby does not have the scp/rsync
> functionality, I would have to either modify it, change the way we do things,
> or 'reinvent' a little different wheel.

There are three things to setup here:

1) archive_command on the master
2) Transport between master and standby(s)
3) recovery_command. pg_standby is the reference implementation here.

You can combine (1) and (2) by putting some sort of network copy command
into the archive_command, but better practice here (and probably required
practice in your case) is to write a script that does that instead.
That's the part you need to worry about.

There is no need for you to reinvent (3) just because you have different
requirements than most for (2). As you've noticed, pg_standby doesn't
actually do the network transport part, and that also means that it's
decoupled from what choices you make for that layer. Focus on writing
scripts to atomically copy the files into the right destination on the
standbys, and pg_standby will take care of applying the shipped log files
to the database.

--
* Greg Smith gsmith(at)gregsmith(dot)com http://www.gregsmith.com Baltimore, MD

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bill Moran 2009-06-03 19:35:56 Re: Upgrading Database: need to dump and restore?
Previous Message Grzegorz Jaśkiewicz 2009-06-03 19:17:59 Re: Upgrading Database: need to dump and restore?