On 20 May 2011, at 12:53, Tim wrote:
> I think you are using Log-Shipping not Streaming-Replication
> http://www.postgresql.org/docs/9.0/static/different-replication-solutions.html
I'm using streaming replication with log shipping as a fallback as per walkthrough here:
http://brandonkonkle.com/blog/2010/oct/20/postgres-9-streaming-replication-and-django-balanc/
> I would just make 2 copies of the WAL file one for each slave in different folders.
> That way if one slave is offline for a period of time it can catch up when it comes back online.
...hence using a combination of the two.
For now, I've reverted to do the following on an hourly basis:
for f in `find /srv/pg_backups -ctime +0.5`; do pg_archivecleanup /srv/pg_backups `basename $f`; done;
...that is, find anything that was changed within the past day and a half and archive it. Not particularly elegant, but
itgives me plenty of time for a slave to go down and replay the logs.