pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: pg_archivecleanup: Add --clean-backup-history
Date: Wed, 19 Jul 2023 04:43:17 +0000
Message-ID: <E1qLz1w-000DQ8-MY@gemulon.postgresql.org> (raw)

pg_archivecleanup: Add --clean-backup-history

By default, pg_archivecleanup does not remove backup history files.
These are just few bytes useful for debugging purposes, still keeping
them around can bloat an archive path history files mixed with the WAL
segments if the path has a long history.

This patch adds a new option to control if backup history files are
removed, depending on the oldest segment name to keep around.

While on it, the TAP tests are refactored so as these are now able to
handle lists of files.  Each file has a flag to track if it should still
exist or not depending on the oldest segment defined with the command
run.

Author: Atsushi Torikoshi
Reviewed-by: Kyotaro Horiguchi, Fujii Masao, Michael Paquier
Discussion: https://postgr.es/m/d660ef741ce3d82f3b4283f1cafd576c@oss.nttdata.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/3f8c98d0b631882e3c513954df42891c1c9585c7

Modified Files
--------------
doc/src/sgml/ref/pgarchivecleanup.sgml             |  12 +++
src/bin/pg_archivecleanup/pg_archivecleanup.c      |  23 ++--
.../pg_archivecleanup/t/010_pg_archivecleanup.pl   | 118 +++++++++++++++------
3 files changed, 115 insertions(+), 38 deletions(-)



Message-ID: <E1qLz1w-000DQ8-MY@gemulon.postgresql.org>
Permalink:  ../E1qLz1w-000DQ8-MY@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1qLz1w-000DQ8-MY@gemulon.postgresql.org

 · 

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: pgsql-committers@postgresql.org
  Cc: michael@paquier.xyz, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: pg_archivecleanup: Add --clean-backup-history
  In-Reply-To: <E1qLz1w-000DQ8-MY@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox