]> granicus.if.org Git - postgresql/commit
Make use of xlog_internal.h's macros in WAL-related utilities.
authorFujii Masao <fujii@postgresql.org>
Thu, 2 Jul 2015 01:35:38 +0000 (10:35 +0900)
committerFujii Masao <fujii@postgresql.org>
Thu, 2 Jul 2015 01:36:18 +0000 (10:36 +0900)
commit163e29dc380137127cf7e9c23b1596b78ad0ce81
tree584dfda34f9d7d23dab4f3074fe7c08fefd016a6
parentcd7030ff085f5c378e837b392cb719cf23df9d0b
Make use of xlog_internal.h's macros in WAL-related utilities.

Commit 179cdd09 added macros to check if a filename is a WAL segment
or other such file. However there were still some instances of the
strlen + strspn combination to check for that in WAL-related utilities
like pg_archivecleanup. Those checks can be replaced with the macros.

This patch makes use of the macros in those utilities and
which would make the code a bit easier to read.

Back-patch to 9.5.

Michael Paquier
contrib/pg_standby/pg_standby.c
src/bin/pg_archivecleanup/pg_archivecleanup.c
src/bin/pg_resetxlog/pg_resetxlog.c
src/include/access/xlog_internal.h