Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1srWZs-002NHb-Gt for pgsql-general@arkaria.postgresql.org; Fri, 20 Sep 2024 05:53:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1srWZq-00GCwc-I7 for pgsql-general@arkaria.postgresql.org; Fri, 20 Sep 2024 05:53:11 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1srWZq-00GCwU-7i for pgsql-general@lists.postgresql.org; Fri, 20 Sep 2024 05:53:11 +0000 Received: from smtp67.iad3a.emailsrvr.com ([173.203.187.67]) by magus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1srWZj-0008SA-Tt for pgsql-general@postgresql.org; Fri, 20 Sep 2024 05:53:10 +0000 X-Auth-ID: xof@thebuild.com Received: by smtp17.relay.iad3a.emailsrvr.com (Authenticated sender: xof-AT-thebuild.com) with ESMTPSA id 575F825E0D; Fri, 20 Sep 2024 01:53:03 -0400 (EDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3776.700.51\)) Subject: Re: PgBackRest and WAL archive expiry From: Christophe Pettus In-Reply-To: Date: Thu, 19 Sep 2024 22:52:32 -0700 Cc: pgsql-general Content-Transfer-Encoding: quoted-printable Message-Id: <267A05E2-4506-4012-870E-124DEF255C41@thebuild.com> References: To: KK CHN X-Mailer: Apple Mail (2.3776.700.51) X-Classification-ID: 5793e39c-f588-4216-9180-eec39f5df4d5-1-1 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On Sep 19, 2024, at 22:46, KK CHN wrote: >=20 > 1. In the EPAS server I have postgres.conf with=20 > archive_command =3D 'pgbackrest --stanza=3DEMI_Repo archive-push %p && = cp %p /data/archive/%f' >=20 > 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.=