mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-27 00:46:29 +00:00
Rename "pg_restore_command" to "restore_command"
The 'pg_' prefix could cause confusion with actual binaries (pg_ctl, pg_basebackup etc.) and there's no obvious reason why we need it.
This commit is contained in:
6
config.c
6
config.c
@@ -224,7 +224,7 @@ parse_config(t_configuration_options *options)
|
|||||||
memset(options->pg_bindir, 0, sizeof(options->pg_bindir));
|
memset(options->pg_bindir, 0, sizeof(options->pg_bindir));
|
||||||
memset(options->pg_ctl_options, 0, sizeof(options->pg_ctl_options));
|
memset(options->pg_ctl_options, 0, sizeof(options->pg_ctl_options));
|
||||||
memset(options->pg_basebackup_options, 0, sizeof(options->pg_basebackup_options));
|
memset(options->pg_basebackup_options, 0, sizeof(options->pg_basebackup_options));
|
||||||
memset(options->pg_restore_command, 0, sizeof(options->pg_restore_command));
|
memset(options->restore_command, 0, sizeof(options->restore_command));
|
||||||
|
|
||||||
/* default master_response_timeout is 60 seconds */
|
/* default master_response_timeout is 60 seconds */
|
||||||
options->master_response_timeout = 60;
|
options->master_response_timeout = 60;
|
||||||
@@ -374,8 +374,8 @@ parse_config(t_configuration_options *options)
|
|||||||
parse_event_notifications_list(options, value);
|
parse_event_notifications_list(options, value);
|
||||||
else if (strcmp(name, "tablespace_mapping") == 0)
|
else if (strcmp(name, "tablespace_mapping") == 0)
|
||||||
tablespace_list_append(options, value);
|
tablespace_list_append(options, value);
|
||||||
else if (strcmp(name, "pg_restore_command") == 0)
|
else if (strcmp(name, "restore_command") == 0)
|
||||||
strncpy(options->pg_restore_command, value, MAXLEN);
|
strncpy(options->restore_command, value, MAXLEN);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
known_parameter = false;
|
known_parameter = false;
|
||||||
|
|||||||
2
config.h
2
config.h
@@ -72,7 +72,7 @@ typedef struct
|
|||||||
char pg_bindir[MAXLEN];
|
char pg_bindir[MAXLEN];
|
||||||
char pg_ctl_options[MAXLEN];
|
char pg_ctl_options[MAXLEN];
|
||||||
char pg_basebackup_options[MAXLEN];
|
char pg_basebackup_options[MAXLEN];
|
||||||
char pg_restore_command[MAXLEN];
|
char restore_command[MAXLEN];
|
||||||
char logfile[MAXLEN];
|
char logfile[MAXLEN];
|
||||||
int monitor_interval_secs;
|
int monitor_interval_secs;
|
||||||
int retry_promote_interval_secs;
|
int retry_promote_interval_secs;
|
||||||
|
|||||||
6
repmgr.c
6
repmgr.c
@@ -4265,11 +4265,11 @@ create_recovery_file(const char *data_dir)
|
|||||||
log_debug(_("recovery.conf: %s"), line);
|
log_debug(_("recovery.conf: %s"), line);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If pg_restore_command is set, we use it as restore_command in recovery.conf */
|
/* If restore_command is set, we use it as restore_command in recovery.conf */
|
||||||
if (strcmp(options.pg_restore_command, "") != 0)
|
if (strcmp(options.restore_command, "") != 0)
|
||||||
{
|
{
|
||||||
maxlen_snprintf(line, "restore_command = '%s'\n",
|
maxlen_snprintf(line, "restore_command = '%s'\n",
|
||||||
options.pg_restore_command);
|
options.restore_command);
|
||||||
if (write_recovery_file_line(recovery_file, recovery_file_path, line) == false)
|
if (write_recovery_file_line(recovery_file, recovery_file_path, line) == false)
|
||||||
return false;
|
return false;
|
||||||
log_debug(_("recovery.conf: %s"), line);
|
log_debug(_("recovery.conf: %s"), line);
|
||||||
|
|||||||
@@ -116,7 +116,7 @@
|
|||||||
# You can specify a restore_command to be used in the recovery.conf that
|
# You can specify a restore_command to be used in the recovery.conf that
|
||||||
# will be placed in the cloned standby
|
# will be placed in the cloned standby
|
||||||
#
|
#
|
||||||
# pg_restore_command = cp /path/to/archived/wals/%f %p
|
# restore_command = cp /path/to/archived/wals/%f %p
|
||||||
|
|
||||||
# Failover settings (repmgrd)
|
# Failover settings (repmgrd)
|
||||||
# ---------------------------
|
# ---------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user