It is my understanding that if PostgeSQL has log shipping enabled, if for whatever reason it cannot ship the file the master server will hold it. But for how long?
Secondly, I have 2 servers I ship log files to using the following script:
#!/usr/local/bin/bash
# Slave 1
rsync -a $1 pgi@192.168.1.105:archive/$2 < /dev/null;
# Slave 2
rsync -a $1 pg@192.168.1.93:archive/$2 < /dev/null;
In this case if Slave 1 is up but Slave 2 is down. It will ship the log file to Slave 1 but not Slave 2 and move one. Thereby Slave 2 will now be out of sync, correct?
To allow both slaves to remain in sync when one is restarted I would need to modify my script to return an error or false to PostgreSQL, this way it will hold the WAL files until both Slaves are online. Correct?
Thanks,
-Joseph