Add new option pg_restore_command.

This can be used so that repmgr standby clone adds the string
specified in repmgr.conf as a restore_command in recovery.conf.

We can use this option for integration with barman by setting the
parameter to an appropriate get-wal call.
This commit is contained in:
Martin
2016-05-17 15:19:20 -03:00
parent c30609426a
commit cf46834041
4 changed files with 20 additions and 2 deletions

View File

@@ -4219,6 +4219,15 @@ 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 (strcmp(options.pg_restore_command, "") != 0)
{
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;
log_debug(_("recovery.conf: %s"), line);
}
fclose(recovery_file);
return true;