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

Поиск
Список
Период
Сортировка
От Fujii Masao
Тема pgsql: Make use of xlog_internal.h's macros in WAL-related utilities.
Дата
Msg-id E1ZATR1-00016f-CG@gemulon.postgresql.org
обсуждение исходный текст
Список 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(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgsql: Don't leave pg_hba and pg_ident data lying around in running bac
Следующее
От: Fujii Masao
Дата:
Сообщение: pgsql: Make use of xlog_internal.h's macros in WAL-related utilities.