Re: PgBackRest and WAL archive expiry

From: Christophe Pettus <xof(at)thebuild(dot)com>
To: KK CHN <kkchn(dot)in(at)gmail(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: PgBackRest and WAL archive expiry
Date: 2024-09-20 05:52:32
Message-ID: 267A05E2-4506-4012-870E-124DEF255C41@thebuild.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> On Sep 19, 2024, at 22:46, KK CHN <kkchn(dot)in(at)gmail(dot)com> wrote:
>
> 1. In the EPAS server I have postgres.conf with
> archive_command = 'pgbackrest --stanza=EMI_Repo archive-push %p && cp %p /data/archive/%f'
>
> The problem is that the /data/archive folder is growing within a few days to 850GB of 2 TB partition.

The /data/archive directory is entirely under your control. pgbackrest and PostgreSQL don't manage them in any way. It will just keep growing indefinitely unless you take action to delete the WAL segments out of it.

There's no real benefit in maintaining that separate /data/archive directory; pgbackrest archives and manages the lifecycle of the WAL segments in its repository. I wouldn't bother with that separate archive, and just use pgbackrest.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Zwettler Markus (OIZ) 2024-09-20 08:01:34 question on timezone with pgBackRest PITR
Previous Message KK CHN 2024-09-20 05:46:10 PgBackRest and WAL archive expiry