From: | Ron Johnson <ron(dot)l(dot)johnson(at)cox(dot)net> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: WAL & ready files retained after turning off log shipping |
Date: | 2017-09-07 14:25:09 |
Message-ID: | 9c7a24fc-f397-478c-b4d2-5f74c9726479@cox.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 09/07/2017 09:08 AM, Tom Lane wrote:
> Ron Johnson <ron(dot)l(dot)johnson(at)cox(dot)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.
Presumably, restarting postgres will fix that?
> 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!).
All WAL files after log shipping was stopped will keep accumulating "forever"?
> 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.
Many thanks.
--
World Peace Through Nuclear Pacification
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2017-09-07 14:32:23 | Re: WAL & ready files retained after turning off log shipping |
Previous Message | Tom Lane | 2017-09-07 14:08:59 | Re: WAL & ready files retained after turning off log shipping |