Re: pg_archivecleanup with multiple slaves

Поиск
Список
Период
Сортировка
От Ben Lancaster
Тема Re: pg_archivecleanup with multiple slaves
Дата
Msg-id ED4EED04-4C0D-4E6F-BA59-F501F5287C58@holler.co.uk
обсуждение исходный текст
Ответ на Re: pg_archivecleanup with multiple slaves  (Tim <elatllat@gmail.com>)
Список pgsql-admin
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. 



В списке pgsql-admin по дате отправления:

Предыдущее
От: "Mark Johnson"
Дата:
Сообщение: Re: LDAP Authentication
Следующее
От: Fujii Masao
Дата:
Сообщение: Re: pg_archivecleanup with multiple slaves