Expending the use of xlog_internal.h's macros - Mailing list pgsql-hackers

From Michael Paquier
Subject Expending the use of xlog_internal.h's macros
Date
Msg-id CAB7nPqSiKU+8HjVe_J05btonC5E7kvmRaLpGS6EaEQe=Dy3jnQ@mail.gmail.com
Whole thread Raw
Responses Re: Expending the use of xlog_internal.h's macros  (Fujii Masao <masao.fujii@gmail.com>)
List pgsql-hackers
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

Attachment

pgsql-hackers by date:

Previous
From: Kouhei Kaigai
Date:
Subject: [idea] table partition + hash join
Next
From: Noah Misch
Date:
Subject: Re: Restore-reliability mode