pgsql: Add macros to check if a filename is a WAL segment or other such

From: Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Add macros to check if a filename is a WAL segment or other such
Date: 2015-05-08 19:07:42
Message-ID: E1Yqncc-0001lJ-Sn@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Add macros to check if a filename is a WAL segment or other such file.

We had many instances of the strlen + strspn combination to check for that.
This makes the code a bit easier to read.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/179cdd098196338880bdbb39c39a788abdad4dd8

Modified Files
--------------
src/backend/access/transam/xlog.c | 11 +++--------
src/backend/replication/basebackup.c | 7 ++-----
src/bin/pg_basebackup/pg_receivexlog.c | 16 ++--------------
src/bin/pg_resetxlog/pg_resetxlog.c | 8 ++++++--
src/include/access/xlog_internal.h | 18 ++++++++++++++++++
5 files changed, 31 insertions(+), 29 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Andres Freund 2015-05-08 20:28:56 pgsql: Fix two problems in infer_arbiter_indexes().
Previous Message Peter Eisentraut 2015-05-08 18:46:14 pgsql: Fix whitespace