Re: Allow pg_archivecleanup to remove backup history files
torikoshia <torikoshia@oss.nttdata.com>
From: torikoshia <torikoshia@oss.nttdata.com>
To: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Cc: michael@paquier.xyz, masao.fujii@oss.nttdata.com,
bharath.rupireddyforpostgres@gmail.com, pgsql-hackers@postgresql.org
Date: 2023-06-21T14:41:33Z
Lists: pgsql-hackers
Attachments
- v11-0001-Introduce-pg_archivecleanup-into-getopt_long.patch (text/x-diff) patch v11-0001
- v11-0002-Preliminary-refactoring-for-a-subsequent-patch.patch (text/x-diff) patch v11-0002
- v11-0003-Allow-pg_archivecleanup-to-remove-backup-history.patch (text/x-diff) patch v11-0003
On 2023-06-21 11:59, Kyotaro Horiguchi wrote: > At Tue, 20 Jun 2023 22:27:36 +0900, torikoshia > <torikoshia@oss.nttdata.com> wrote in >> On 2023-06-19 14:37, Michael Paquier wrote: >> > On Mon, Jun 19, 2023 at 11:24:29AM +0900, torikoshia wrote: >> >> Thanks, now I understand what you meant. >> > If I may ask, why is the refactoring of 0003 done after the feature in >> > 0002? Shouldn't the order be reversed? That would make for a cleaner >> > git history. >> > -- >> > Michael >> >> Agreed. >> Reversed the order of patches 0002 and 0003. > > Yeah, that is a possible division. However, I meant that we have room > to refactor and decrease the nesting level even further, considering > that 0003 already does this to some extent, when I suggested it. In > that sense, moving the nest-reduction part of 0003 into 0002 makes us > possible to focus on the point of this patch. Thanks for the comment, it seems better than v9 patch. > What do you think about the attached version? --v10-0002-Preliminary-refactoring-for-a-subsequent-patch.patch + * Also we skip backup history files when --clean-backup-history + * is not specified. + */ + if (!IsXLogFileName(walfile) && !IsPartialXLogFileName(walfile)) + continue; I think this comment should be located in 0003. Attached updated patches. -- Regards, -- Atsushi Torikoshi NTT DATA CORPORATION
Commits
-
pg_archivecleanup: Add --clean-backup-history
- 3f8c98d0b631 17.0 landed
-
pg_archivecleanup: Refactor loop doing old segment removals
- 4a7556f77c44 17.0 landed
-
Introduce long options in pg_archivecleanup
- dd7c60f1935a 17.0 landed