mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-26 00:26:30 +00:00
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:
9
repmgr.c
9
repmgr.c
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user