pgsql: Add macros to check if a filename is a WAL segment or other such - Mailing list pgsql-committers

From Heikki Linnakangas
Subject pgsql: Add macros to check if a filename is a WAL segment or other such
Date
Msg-id E1Yqncc-0001lJ-Sn@gemulon.postgresql.org
Whole thread Raw
List 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(-)


pgsql-committers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: pgsql: At promotion, archive last segment from old timeline with .parti
Next
From: Andres Freund
Date:
Subject: pgsql: Fix two problems in infer_arbiter_indexes().