We are currently using WAL shipping to have a hot spare of our databases. We want to add another node to this configuration. The question is, what is the best way to go about this?

Currently, our script checks to see if the WAL file already exists on the target server, if not, then we scp the file over. This is a local machine, so the scp overhead is not considered to be an issue.

So, the current approach is:

ssh $1 "test ! -f $2/$4" && scp $3 $1:$2/$4

So, should I simply duplicate that line for the second server and place it below this one, or should they be dependent upon each other? That is:


archive_command = 'archive.sh node1 /esc/master/pitr %p %f node2'


ssh $1 "test ! -f $2/$4" && scp $3 $1:$2/$4 &&
ssh $5 "test ! -f $2/$4" && scp $3 $5:$2/$4

The second node will not be at the same location, thus the network reliability is less.

Thanks for any insights.


--
Until later, Geoffrey

Those who would give up essential Liberty, to purchase a little
temporary Safety, deserve neither Liberty nor Safety.
 - Benjamin Franklin

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to