Re: Warm Standby Setup Documentation

Поиск
Список
Период
Сортировка
От Greg Smith
Тема Re: Warm Standby Setup Documentation
Дата
Msg-id 4BB03321.1010606@2ndquadrant.com
обсуждение исходный текст
Ответ на Re: Warm Standby Setup Documentation  (Ogden <lists@darkstatic.com>)
Список 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 по дате отправления:

Предыдущее
От: Vitali Xevet
Дата:
Сообщение: Simultaneous write requests
Следующее
От: Greg Smith
Дата:
Сообщение: Re: Warm Standby Setup Documentation