Ogden wrote:
How is it possible to use the archive_command to ship to different ones? archive_command = 'rsync -a %p postgres@xxxxxxxxxxx:/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@xxxxxxxxxxxxxxx www.2ndQuadrant.us -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general