Re: Warm Standby Setup Documentation

From: Greg Smith <greg(at)2ndquadrant(dot)com>
To: Ogden <lists(at)darkstatic(dot)com>
Cc: PGSQL Mailing List <pgsql-general(at)postgresql(dot)org>
Subject: Re: Warm Standby Setup Documentation
Date: 2010-03-29 04:57:05
Message-ID: 4BB03321.1010606@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Ogden wrote:
> How is it possible to use the archive_command to ship to different ones?
>
> archive_command = 'rsync -a %p postgres(at)192(dot)168(dot)x(dot)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(at)2ndQuadrant(dot)com www.2ndQuadrant.us

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Greg Smith 2010-03-29 05:11:30 Re: Warm Standby Setup Documentation
Previous Message Vitali Xevet 2010-03-29 04:50:11 Simultaneous write requests