diff --git a/config.c b/config.c index 6a63c0a0..38b66740 100644 --- a/config.c +++ b/config.c @@ -375,7 +375,7 @@ parse_config(t_configuration_options *options) else if (strcmp(name, "tablespace_mapping") == 0) tablespace_list_append(options, value); else if (strcmp(name, "pg_restore_command") == 0) - strncpy(options->pg_restore_command, value, MAXLEN); + strncpy(options->pg_restore_command, value, MAXLEN); else { known_parameter = false; diff --git a/repmgr.c b/repmgr.c index 03b926e8..1cba47c7 100644 --- a/repmgr.c +++ b/repmgr.c @@ -4264,10 +4264,10 @@ create_recovery_file(const char *data_dir) log_debug(_("recovery.conf: %s"), line); } - /* If pg_restore_command is set, we use it as resore_cmmand in recovery.conf */ + /* If pg_restore_command is set, we use it as restore_cmmand in recovery.conf */ if (strcmp(options.pg_restore_command, "") != 0) { - maxlen_snprintf(line, "restore_command = '%s'\n", + maxlen_snprintf(line, "restore_command = '%s'\n", options.pg_restore_command); if (write_recovery_file_line(recovery_file, recovery_file_path, line) == false) return false; diff --git a/repmgr.conf.sample b/repmgr.conf.sample index 5964f14d..2d46e7d9 100644 --- a/repmgr.conf.sample +++ b/repmgr.conf.sample @@ -116,7 +116,7 @@ # You can specify a restore_command to be used in the recovery.conf that # will be placed in the cloned standby # -# pg_resore_command = cp /path/to/archived/wals/%f %p +# pg_restore_command = cp /path/to/archived/wals/%f %p # Failover settings (repmgrd) # ---------------------------