mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-25 08:06:29 +00:00
Fix alignment and syntax
This commit is contained in:
29
repmgr.c
29
repmgr.c
@@ -2799,11 +2799,14 @@ do_standby_follow(void)
|
|||||||
exit(ERR_BAD_CONFIG);
|
exit(ERR_BAD_CONFIG);
|
||||||
|
|
||||||
/* Finally, restart the service */
|
/* Finally, restart the service */
|
||||||
if (*options.restart_command) {
|
if (*options.restart_command)
|
||||||
|
{
|
||||||
maxlen_snprintf(script, "%s", options.restart_command);
|
maxlen_snprintf(script, "%s", options.restart_command);
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
maxlen_snprintf(script, "%s %s -w -D %s -m fast restart",
|
maxlen_snprintf(script, "%s %s -w -D %s -m fast restart",
|
||||||
make_pg_path("pg_ctl"), options.pg_ctl_options, data_dir);
|
make_pg_path("pg_ctl"), options.pg_ctl_options, data_dir);
|
||||||
}
|
}
|
||||||
log_notice(_("restarting server using '%s'\n"),
|
log_notice(_("restarting server using '%s'\n"),
|
||||||
script);
|
script);
|
||||||
@@ -3282,10 +3285,13 @@ do_standby_switchover(void)
|
|||||||
* -> use -F/--force?
|
* -> use -F/--force?
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (*options.stop_command) {
|
if (*options.stop_command)
|
||||||
|
{
|
||||||
maxlen_snprintf(command, "%s", options.stop_command);
|
maxlen_snprintf(command, "%s", options.stop_command);
|
||||||
} else {
|
}
|
||||||
maxlen_snprintf(command,
|
else
|
||||||
|
{
|
||||||
|
maxlen_snprintf(command,
|
||||||
"%s -D %s -m %s -W stop >/dev/null 2>&1 && echo 1 || echo 0",
|
"%s -D %s -m %s -W stop >/dev/null 2>&1 && echo 1 || echo 0",
|
||||||
make_pg_path("pg_ctl"),
|
make_pg_path("pg_ctl"),
|
||||||
remote_data_directory,
|
remote_data_directory,
|
||||||
@@ -4050,12 +4056,15 @@ do_witness_create(void)
|
|||||||
|
|
||||||
|
|
||||||
/* start new instance */
|
/* start new instance */
|
||||||
if (*options.start_command) {
|
if (*options.start_command)
|
||||||
|
{
|
||||||
maxlen_snprintf(script, "%s", options.start_command);
|
maxlen_snprintf(script, "%s", options.start_command);
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
maxlen_snprintf(script, "%s %s -w -D %s start",
|
maxlen_snprintf(script, "%s %s -w -D %s start",
|
||||||
make_pg_path("pg_ctl"),
|
make_pg_path("pg_ctl"),
|
||||||
options.pg_ctl_options, runtime_options.dest_dir);
|
options.pg_ctl_options, runtime_options.dest_dir);
|
||||||
}
|
}
|
||||||
log_info(_("starting witness server: %s\n"), script);
|
log_info(_("starting witness server: %s\n"), script);
|
||||||
r = system(script);
|
r = system(script);
|
||||||
|
|||||||
Reference in New Issue
Block a user