Re: [GENERAL] WAL & ready files retained after turning off log shipping

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [GENERAL] WAL & ready files retained after turning off log shipping
Дата
Msg-id 6535.1504793339@sss.pgh.pa.us
обсуждение исходный текст
Ответ на [GENERAL] WAL & ready files retained after turning off log shipping  (Ron Johnson <ron.l.johnson@cox.net>)
Ответы Re: [GENERAL] WAL & ready files retained after turning off log shipping  (Michael Paquier <michael.paquier@gmail.com>)
Список pgsql-general
Ron Johnson <ron.l.johnson@cox.net> writes:
> After disabling log shipping via setting "archive_mode = off", and then
> running, "pg_ctl reload", old WAL files and their associated .ready files
> aren't being deleted.

Hmm.  I might be misremembering, but I think that it's the archiver
process that is in charge of deleting those files, so that this behavior
doesn't seem surprising.

I don't think anybody's thought very hard about how to clean up if
archiving had been running and then you turn it off with not everything
having been archived.

Manual cleanup shouldn't be very hard, fortunately.  Run pg_controldata
to see where the last checkpoint is, and delete WAL files whose names
indicate they are before that (but not the one including the checkpoint!).
If you don't intend to do archiving any more, you can just flush all the
.ready files (and .done if any) without much thought.

            regards, tom lane


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

Предыдущее
От: Ron Johnson
Дата:
Сообщение: [GENERAL] WAL & ready files retained after turning off log shipping
Следующее
От: Ron Johnson
Дата:
Сообщение: Re: [GENERAL] WAL & ready files retained after turning off logshipping