pgsql: Use XLOG_CONTROL_FILE macro consistently for control file name. - Mailing list pgsql-committers

From Fujii Masao
Subject pgsql: Use XLOG_CONTROL_FILE macro consistently for control file name.
Date
Msg-id E1u1aMt-0032OE-1r@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Use XLOG_CONTROL_FILE macro consistently for control file name.

The XLOG_CONTROL_FILE macro (defined in access/xlog_internal.h)
represents the control file name. While some parts of the codebase already
use this macro, others previously hardcoded the file name as a string.

This commit replaces those hardcoded strings with the macro,
ensuring consistent usage throughout the code. This makes future
maintenance easier and improves searchability, for example when
grepping for control file usage.

Author: Anton A. Melnikov <a.melnikov@postgrespro.ru>
Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
Reviewed-by: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Reviewed-by: Masao Fujii <masao.fujii@gmail.com>
Discussion: https://postgr.es/m/0841ec77-47e5-452a-adb4-c6fa55d605fc@postgrespro.ru

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/173c97812ffcc48082355df71470974c33379d3f

Modified Files
--------------
src/backend/backup/basebackup.c             |  2 +-
src/backend/postmaster/postmaster.c         |  3 ++-
src/bin/pg_combinebackup/pg_combinebackup.c |  5 +++--
src/bin/pg_controldata/pg_controldata.c     |  2 +-
src/bin/pg_rewind/filemap.c                 |  3 ++-
src/bin/pg_rewind/pg_rewind.c               |  8 ++++----
src/bin/pg_upgrade/controldata.c            | 11 ++++++-----
src/bin/pg_verifybackup/astreamer_verify.c  |  5 +++--
src/bin/pg_verifybackup/pg_verifybackup.c   |  3 ++-
src/common/controldata_utils.c              |  2 +-
10 files changed, 25 insertions(+), 19 deletions(-)


pgsql-committers by date:

Previous
From: Daniel Gustafsson
Date:
Subject: pgsql: doc: Clarify project naming
Next
From: Michael Paquier
Date:
Subject: pgsql: Fix use-after-free in pgstat_fetch_stat_backend_by_pid()