Re: Warm Standby Setup Documentation - Mailing list pgsql-general

From Greg Smith
Subject Re: Warm Standby Setup Documentation
Date
Msg-id 4BB03321.1010606@2ndquadrant.com
Whole thread Raw
In response to Re: Warm Standby Setup Documentation  (Ogden <lists@darkstatic.com>)
List pgsql-general
Ogden wrote:
> How is it possible to use the archive_command to ship to different ones?
>
> archive_command = 'rsync -a %p postgres@192.168.x.x:/usr/local/pgsql/walfiles/%f </dev/null'
> archive_timeout = 120         # force a logfile segment switch after this
>
> I suppose you can put multiple commands there then?
>

The examples in the manual lead one toward putting a full command line
into the script.  I personally never do that; I call a full-size script
with "%f %p" and put all of the transport details into it instead.  Once
you do that, you can ship that segment all over the place if you feel
like it, and add significantly better error detection/recovery than
possible in a single line too.  As already mentioned, you do need to
make sure that you don't end up blocking archiving on the master due to
delivery failure on an optional node however.

> Also, 2 minutes - is this reasonable for a heavy write database?
>

It's extremely unlikely a write-heavy database will care about the
setting of archive_timeout.  That setting exists for the situation where
you sometimes go some number of minutes without generating at least 16MB
of WAL writes, and want to force a log file to ship anyway.  That
shouldn't happen often on a busy server.  Setting archive_timeout to a
lower value mainly is a source of overhead on mostly idle systems.

--
Greg Smith  2ndQuadrant US  Baltimore, MD
PostgreSQL Training, Services and Support
greg@2ndQuadrant.com   www.2ndQuadrant.us


pgsql-general by date:

Previous
From: Vitali Xevet
Date:
Subject: Simultaneous write requests
Next
From: Greg Smith
Date:
Subject: Re: Warm Standby Setup Documentation