public inbox for [email protected]  
help / color / mirror / Atom feed
From: Fabrice Chapuis <[email protected]>
To: PostgreSQL Hackers <[email protected]>
Subject: wal recycling problem
Date: Thu, 28 Sep 2023 13:11:41 +0200
Message-ID: <CAA5-nLCrbc90DHbX_9Yav72hEXUetkZ9iO8zmKvCvYNZkDHx9g@mail.gmail.com> (raw)

Hello,

I have a question about the automatic removal of unused WAL files. When
loading data with pg_restore (200Gb) we noticed that a lot of WALs files
are generated and they are not purged automatically nor recycled despite
frequent checkpoints, then pg_wal folder (150Gb) fill and become out of
space.
We have a cluster of 2 members (1 primary and 1 standby) with Postgres
version 14.9 and 2 barman server, slots are only configured for barman,
barman is version 3.7.
The archive command is desactivated (archive_command=':')
I use pg_archivecleanup (with the wal file generated from the last
checkpoint in parameter) to remove files manually before the limit of 150Gb
so that the restore can terminate.

Why does postgres do not this cleanup automatically, which part of the code
is responsible for removing or recycling the wals?

Thanks for your help

Fabrice


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]
  Subject: Re: wal recycling problem
  In-Reply-To: <CAA5-nLCrbc90DHbX_9Yav72hEXUetkZ9iO8zmKvCvYNZkDHx9g@mail.gmail.com>

* 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