WAL archive cleanup om master

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема WAL archive cleanup om master
Дата
Msg-id 20140106111842.GA23118@svana.org
обсуждение исходный текст
Ответы Re: WAL archive cleanup om master
Re: WAL archive cleanup om master
Список pgsql-general
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?

Thanks in advance,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> He who writes carelessly confesses thereby at the very outset that he does
> not attach much importance to his own thoughts.
   -- Arthur Schopenhauer

Вложения

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

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: Dynamic SQL - transition from ms to pg
Следующее
От: gromitracer
Дата:
Сообщение: New to postgresql - Do I have to be a "superuser" to be able to create a database?