Hi all,
While looking at the code of pg_archivecleanup.c, I noticed that there
is some code present to detect if a given string has the format of a
WAL segment file name or of a backup file.
The recent commit 179cdd09 has introduced in xlog_internal.h a set of
macros to facilitate checks of pg_xlog's name format:
IsPartialXLogFileName(), IsXLogFileName() and IsTLHistoryFileName().
And by looking at the code, there are some utilities where we could
make use of that, like pg_resetxlog, pg_archivecleanup and pg_standby.
Attached is a small refactoring patch doing so for HEAD.
Regards,
--
Michael