Log Shipping - Mailing list pgsql-general

From Joseph Kregloh
Subject Log Shipping
Date
Msg-id CAAW2xfcjjTUeTzytQ9r9OY=LMMByrLodeN78DLcgDAGJR55D4w@mail.gmail.com
Whole thread Raw
Responses Re: Log Shipping
List pgsql-general
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

pgsql-general by date:

Previous
From: Scott Mead
Date:
Subject: Re: Checkpoint Err on Startup of Rsynced System
Next
From: Alvaro Herrera
Date:
Subject: Re: Log Shipping