Re: WAL archive cleanup om master
От | Adrian Klaver |
---|---|
Тема | Re: WAL archive cleanup om master |
Дата | |
Msg-id | 52CACE82.1000604@gmail.com обсуждение исходный текст |
Ответ на | WAL archive cleanup om master (Martijn van Oosterhout <kleptog@svana.org>) |
Список | pgsql-general |
On 01/06/2014 03:18 AM, Martijn van Oosterhout wrote: > Hoi, > > I've setup a up WAL shipping configuration as described in the wiki. On > the master I have: > > archive_mode = on > archive_command = 'cp %p /path_to/archive/%f' > > and on the slave in the recovery.conf I have: > > archive_cleanup_command = 'pg_archivecleanup /path/to/archive/ %r' > restore_command = 'cp /path/to/archive/%f %p' > > In between the two machines I have an rsync process copying the files > from the master to the slave. > > My problem is, that the archive_cleanup_command on the slave is > clearing old WAL files, which the rsync on the master just copies again > because they are still on the master. > > I can make a script on the master that deletes files older than an > hour, but that will break horribly if the copying breaks for an hour. > > Is there a smarter way to do this, like having rsync not copy stuff > already copied once? From the Department of Second Thoughts and with aid of additional caffeine, I am fairly certain that the rsync switch I sent in previous post will not help. If the archive_command cp is working then rsync will have nothing to do. If the archive_command cp is not working then rsync will not create any new files in its absence. > > Thanks in advance, > -- Adrian Klaver adrian.klaver@gmail.com
В списке pgsql-general по дате отправления: