diff options
author | Fujii Masao <fujii@postgresql.org> | 2025-04-07 09:27:33 +0900 |
---|---|---|
committer | Fujii Masao <fujii@postgresql.org> | 2025-04-07 09:27:33 +0900 |
commit | 173c97812ffcc48082355df71470974c33379d3f (patch) | |
tree | b2baf34d84037e2b9d70bd9ac7abbb65eb73c5a5 /src/backend/backup/basebackup.c | |
parent | a233a603bab80fdf6da2b4908c98f166273aa0cb (diff) | |
download | postgresql-173c97812ffcc48082355df71470974c33379d3f.tar.gz postgresql-173c97812ffcc48082355df71470974c33379d3f.zip |
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
Diffstat (limited to 'src/backend/backup/basebackup.c')
-rw-r--r-- | src/backend/backup/basebackup.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/backup/basebackup.c b/src/backend/backup/basebackup.c index 891637e3a44..f0f88838dc2 100644 --- a/src/backend/backup/basebackup.c +++ b/src/backend/backup/basebackup.c @@ -1349,7 +1349,7 @@ sendDir(bbsink *sink, const char *path, int basepathlen, bool sizeonly, snprintf(pathbuf, sizeof(pathbuf), "%s/%s", path, de->d_name); /* Skip pg_control here to back up it last */ - if (strcmp(pathbuf, "./global/pg_control") == 0) + if (strcmp(pathbuf, "./" XLOG_CONTROL_FILE) == 0) continue; if (lstat(pathbuf, &statbuf) != 0) |