pgsql: pg_archivecleanup: Refactor loop doing old segment removals

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: pg_archivecleanup: Refactor loop doing old segment removals
Date: 2023-07-19 03:24:06
Message-ID: E1qLxnJ-000Cos-Nl@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

pg_archivecleanup: Refactor loop doing old segment removals

This commit refactors a bit the main loop of pg_archivecleanup that
handles the removal of old segments, reducing by one its level of
indentation. This will help an incoming patch that adds a new option
related to the segment filtering logic.

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/4a7556f77c44d295241d2432094b40156f69be1a

Modified Files
--------------
src/bin/pg_archivecleanup/pg_archivecleanup.c | 128 +++++++++++++-------------
1 file changed, 66 insertions(+), 62 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2023-07-19 04:43:17 pgsql: pg_archivecleanup: Add --clean-backup-history
Previous Message Amit Kapila 2023-07-19 02:49:23 pgsql: Doc: Update the logical replication restriction w.r.t Replica Id