pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Make use of xlog_internal.h's macros in WAL-related utilities.
2+ messages / 1 participants
[nested] [flat]

* pgsql: Make use of xlog_internal.h's macros in WAL-related utilities.
@ 2015-07-02 01:37 Fujii Masao <fujii@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Fujii Masao @ 2015-07-02 01:37 UTC (permalink / raw)
  To: 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
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/fb174687f7a730edcf301949785a6ac0dbfd70d0

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(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* pgsql: Make use of xlog_internal.h's macros in WAL-related utilities.
@ 2015-07-02 01:37 Fujii Masao <fujii@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Fujii Masao @ 2015-07-02 01:37 UTC (permalink / raw)
  To: 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(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2015-07-02 01:37 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2015-07-02 01:37 pgsql: Make use of xlog_internal.h's macros in WAL-related utilities. Fujii Masao <fujii@postgresql.org>
2015-07-02 01:37 pgsql: Make use of xlog_internal.h's macros in WAL-related utilities. Fujii Masao <fujii@postgresql.org>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox