mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-27 08:56:29 +00:00
repmgr: use make_pg_path() consistently
Per comment from gciolli.
This commit is contained in:
30
repmgr.c
30
repmgr.c
@@ -2734,6 +2734,8 @@ do_standby_follow(void)
|
|||||||
*
|
*
|
||||||
* TODO:
|
* TODO:
|
||||||
* - make connection test timeouts/intervals configurable (see below)
|
* - make connection test timeouts/intervals configurable (see below)
|
||||||
|
* - add command line option --remote_pg_bindir or similar to
|
||||||
|
* optionally handle cases where the remote pg_bindir is different
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -2892,8 +2894,8 @@ do_standby_switchover(void)
|
|||||||
/* 9.5 and later have pg_rewind built-in - always use that */
|
/* 9.5 and later have pg_rewind built-in - always use that */
|
||||||
use_pg_rewind = true;
|
use_pg_rewind = true;
|
||||||
maxlen_snprintf(remote_pg_rewind,
|
maxlen_snprintf(remote_pg_rewind,
|
||||||
"%s/pg_rewind",
|
"%s",
|
||||||
pg_bindir);
|
make_pg_path("pg_rewind"));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -2913,8 +2915,8 @@ do_standby_switchover(void)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
maxlen_snprintf(remote_pg_rewind,
|
maxlen_snprintf(remote_pg_rewind,
|
||||||
"%s/pg_rewind",
|
"%s",
|
||||||
pg_bindir);
|
make_pg_path("pg_rewind"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -3109,8 +3111,8 @@ do_standby_switchover(void)
|
|||||||
log_verbose(LOG_DEBUG, "remote_archive_config_dir: %s\n", remote_archive_config_dir);
|
log_verbose(LOG_DEBUG, "remote_archive_config_dir: %s\n", remote_archive_config_dir);
|
||||||
|
|
||||||
maxlen_snprintf(command,
|
maxlen_snprintf(command,
|
||||||
"%s/repmgr standby archive-config -f %s --config-archive-dir=%s",
|
"%s standby archive-config -f %s --config-archive-dir=%s",
|
||||||
pg_bindir,
|
make_pg_path("repmgr"),
|
||||||
runtime_options.remote_config_file,
|
runtime_options.remote_config_file,
|
||||||
remote_archive_config_dir);
|
remote_archive_config_dir);
|
||||||
|
|
||||||
@@ -3222,8 +3224,8 @@ do_standby_switchover(void)
|
|||||||
|
|
||||||
/* Execute pg_rewind */
|
/* Execute pg_rewind */
|
||||||
maxlen_snprintf(command,
|
maxlen_snprintf(command,
|
||||||
"%s/pg_rewind -D %s --source-server=\\'%s\\'",
|
"%s -D %s --source-server=\\'%s\\'",
|
||||||
pg_bindir,
|
remote_pg_rewind,
|
||||||
remote_data_directory,
|
remote_data_directory,
|
||||||
options.conninfo);
|
options.conninfo);
|
||||||
|
|
||||||
@@ -3244,8 +3246,8 @@ do_standby_switchover(void)
|
|||||||
|
|
||||||
/* Restore any previously archived config files */
|
/* Restore any previously archived config files */
|
||||||
maxlen_snprintf(command,
|
maxlen_snprintf(command,
|
||||||
"%s/repmgr standby restore-config -D %s --config-archive-dir=%s",
|
"%s standby restore-config -D %s --config-archive-dir=%s",
|
||||||
pg_bindir,
|
make_pg_path("repmgr"),
|
||||||
remote_data_directory,
|
remote_data_directory,
|
||||||
remote_archive_config_dir);
|
remote_archive_config_dir);
|
||||||
|
|
||||||
@@ -3302,8 +3304,8 @@ do_standby_switchover(void)
|
|||||||
|
|
||||||
format_db_cli_params(options.conninfo, repmgr_db_cli_params);
|
format_db_cli_params(options.conninfo, repmgr_db_cli_params);
|
||||||
maxlen_snprintf(command,
|
maxlen_snprintf(command,
|
||||||
"%s/repmgr -D %s -f %s %s --rsync-only --force --ignore-external-config-files standby clone",
|
"%s -D %s -f %s %s --rsync-only --force --ignore-external-config-files standby clone",
|
||||||
pg_bindir,
|
make_pg_path("repmgr"),
|
||||||
remote_data_directory,
|
remote_data_directory,
|
||||||
runtime_options.remote_config_file,
|
runtime_options.remote_config_file,
|
||||||
repmgr_db_cli_params
|
repmgr_db_cli_params
|
||||||
@@ -3328,8 +3330,8 @@ do_standby_switchover(void)
|
|||||||
*/
|
*/
|
||||||
format_db_cli_params(options.conninfo, repmgr_db_cli_params);
|
format_db_cli_params(options.conninfo, repmgr_db_cli_params);
|
||||||
maxlen_snprintf(command,
|
maxlen_snprintf(command,
|
||||||
"%s/repmgr -D %s -f %s %s standby follow",
|
"%s -D %s -f %s %s standby follow",
|
||||||
pg_bindir,
|
make_pg_path("repmgr"),
|
||||||
remote_data_directory,
|
remote_data_directory,
|
||||||
runtime_options.remote_config_file,
|
runtime_options.remote_config_file,
|
||||||
repmgr_db_cli_params
|
repmgr_db_cli_params
|
||||||
|
|||||||
Reference in New Issue
Block a user