public inbox for [email protected]
help / color / mirror / Atom feedFrom: Laurenz Albe <[email protected]>
To: loganathan P <[email protected]>
To: [email protected]
Subject: Re: PostgreSQL Archive Log Partition Reaching 95% – Need Automated Cleanup
Date: Tue, 03 Mar 2026 15:48:01 +0100
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAFX4Q9LhPByLecCuHu7gkmmNnDeKwG2CmG01y5ChOwtLrPdE=g@mail.gmail.com>
References: <CAFX4Q9LhPByLecCuHu7gkmmNnDeKwG2CmG01y5ChOwtLrPdE=g@mail.gmail.com>
On Tue, 2026-03-03 at 19:51 +0530, loganathan P wrote:
> We have PostgreSQL 15 and PostgreSQL 17 databases running in separate environments on different servers.
> Each database is approximately 1.5 TB in size and highly active, generating around 500 GB of archive
> logs per day. We have VM SRM replication configured.
>
> The archive log partition reaches 95–100% utilization before backups are taken. After the backups are
> completed, we must manually remove the archived log files to free up space.
>
> Could you please advise whether PostgreSQL has any built-in parameters or mechanisms to automatically
> delete archived log files once they have been successfully backed up?
Since PostgreSQL doesn't know about your archives, there is no way for it to clean
up automatically. You have to do that yourself.
There is the "pg_archivecleanup" utility that you can use with the backup file
generated in the WAL archive:
pg_archivecleanup /mnt/server/archivedir 000000010000000000000010.00000020.backup
The easiest way would be to use a backup software like pgBackRest that does these
things for you.
Yours,
Laurenz Albe
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: PostgreSQL Archive Log Partition Reaching 95% – Need Automated Cleanup
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox