pgsql: Make use of xlog_internal.h's macros in WAL-related utilities.

From: Fujii Masao <fujii(at)postgresql(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Make use of xlog_internal.h's macros in WAL-related utilities.
Date: 2015-07-02 01:37:03
Message-ID: E1ZATR1-00016g-CL@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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

Branch
------
REL9_5_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/163e29dc380137127cf7e9c23b1596b78ad0ce81

Modified Files
--------------
contrib/pg_standby/pg_standby.c | 24 +++++++-----------------
src/bin/pg_archivecleanup/pg_archivecleanup.c | 22 ++++++++--------------
src/bin/pg_resetxlog/pg_resetxlog.c | 11 +++++------
src/include/access/xlog_internal.h | 19 +++++++++++++------
4 files changed, 33 insertions(+), 43 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Andrew Dunstan 2015-07-02 03:32:19 pgsql: Allow MSVC's contribcheck and modulescheck to run independently.
Previous Message Tom Lane 2015-07-01 22:55:48 pgsql: Don't leave pg_hba and pg_ident data lying around in running bac