Re: Archive directory - Mailing list pgsql-admin

From Paul Förster
Subject Re: Archive directory
Date
Msg-id A8B05077-547F-4899-9D9E-4051C02DA2BE@gmail.com
Whole thread Raw
In response to Re: Archive directory  (Scott Ribe <scott_ribe@elevated-dev.com>)
List pgsql-admin
Hi Scott, hi Yambu,

> On 07. Dec, 2020, at 15:11, Scott Ribe <scott_ribe@elevated-dev.com> wrote:
>
>> On Dec 7, 2020, at 7:02 AM, Paul Förster <paul.foerster@gmail.com> wrote:
>>
>> in my understanding, this is only true if you don't use replication slots. If you use replication slots then the
primaryshould know when a WAL file is no longer needed and abandoned or ready to be recycled. 
>
> I don't think OP is talking about the WAL files PG is managing; I think he's talking about WAL files copied into an
archivedirectory. 

if those files already archived to some destination are referred to, then yes, you can do with them whatever you want.
Theycan be removed if they are not needed for a PITR. 

For example, we remove them time-based. Files older than a certain number of days are removed (cron job, note: the job
onlyremoves files in the archive destination, NOT in ${PGDATA}/pg_wal). 

Cheers,
Paul


pgsql-admin by date:

Previous
From: Scott Ribe
Date:
Subject: Re: Archive directory
Next
From: Jeff Janes
Date:
Subject: Re: Archive directory