Re: wal archiving on a hot-standby server

Поиск
Список
Период
Сортировка
От Robert Treat
Тема Re: wal archiving on a hot-standby server
Дата
Msg-id CABV9wwMyW-++o-r1fZoTeMj5Wwa=7Xm7B3UZL8GLPFtHGZCpDA@mail.gmail.com
обсуждение исходный текст
Ответ на wal archiving on a hot-standby server  (Enrico Sirola <enrico.sirola@gmail.com>)
Список pgsql-general
On Mon, Nov 21, 2011 at 5:58 AM, Enrico Sirola <enrico.sirola@gmail.com> wrote:
> Hello,
> is it possible to archive the WAL files received by a hot-standby server? In noticed nothing about this on the pgsql
docs.The idea 
> is to archive logs in two locations, at the primary site and at the replica site (over a wan) in order to be able to
performa PITR also 
> at the replica site.

You can do this 2 different ways; 1 is by adding multiple destinations
into your archive command to send the wal file to multiple
destinations;  here is an example using omnipitr (the -dr are the
remote destinations, we gzip the first for long term archiving)

/opt/OMNIpitr/bin/omnipitr-archive -dr
gzip=db4:/mnt/db/prod/walarchive/ -dr db2:/mnt/db/prod/db2-walarchive/
  "%p"

The other way to do this is to add something into your
archive_cleanup_command of your recovery.conf to archive the files to
the other destination.

Which method you want depends on the version / setup of postgres you
have, and whether you want the slave to be in the chain of the replica
site. (I probably wouldn't, which would make me lean towards something
like omnipitr)

Robert Treat
conjecture: xzilla.net
consulting: omniti.com

В списке pgsql-general по дате отправления:

Предыдущее
От: Robert Treat
Дата:
Сообщение: Re: Is this safe to perform on PostgreSQL 8.3.7 -> Resize a column in a PostgreSQL table without changing data
Следующее
От: Scott Marlowe
Дата:
Сообщение: Re: autovacuum stuck on a table for 18+ hours, consuming lots of CPU time