Re: Archive directory

From: Paul Förster <paul(dot)foerster(at)gmail(dot)com>
To: Scott Ribe <scott_ribe(at)elevated-dev(dot)com>
Cc: Yambu <hyambu(at)gmail(dot)com>, Ian Lawrence Barwick <barwick(at)gmail(dot)com>, Pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Re: Archive directory
Date: 2020-12-07 14:31:21
Message-ID: A8B05077-547F-4899-9D9E-4051C02DA2BE@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi Scott, hi Yambu,

> On 07. Dec, 2020, at 15:11, Scott Ribe <scott_ribe(at)elevated-dev(dot)com> wrote:
>
>> On Dec 7, 2020, at 7:02 AM, Paul Förster <paul(dot)foerster(at)gmail(dot)com> wrote:
>>
>> in my understanding, this is only true if you don't use replication slots. If you use replication slots then the primary should 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 archive directory.

if those files already archived to some destination are referred to, then yes, you can do with them whatever you want. They can 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 only removes files in the archive destination, NOT in ${PGDATA}/pg_wal).

Cheers,
Paul

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Jeff Janes 2020-12-07 18:15:48 Re: Archive directory
Previous Message Scott Ribe 2020-12-07 14:11:38 Re: Archive directory