From 3f8c98d0b631882e3c513954df42891c1c9585c7 Mon Sep 17 00:00:00 2001 From: Michael Paquier Date: Wed, 19 Jul 2023 13:41:22 +0900 Subject: 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 --- doc/src/sgml/ref/pgarchivecleanup.sgml | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'doc/src') diff --git a/doc/src/sgml/ref/pgarchivecleanup.sgml b/doc/src/sgml/ref/pgarchivecleanup.sgml index 09991c2fcdd..cd8f49b1c5b 100644 --- a/doc/src/sgml/ref/pgarchivecleanup.sgml +++ b/doc/src/sgml/ref/pgarchivecleanup.sgml @@ -93,6 +93,18 @@ pg_archivecleanup: removing file "archive/00000001000000370000000E" + + + + + + Remove backup history files as well. + See for details about backup + history files. + + + + -- cgit v1.2.3