mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-27 08:56:29 +00:00
Enable provision of "archive_cleanup_command" in recovery.conf
If "archive_cleanup_command" is defined in "repmgr.conf", a corresponding entry will be made in the node's "recovery.conf" file after cloning a standby. Note that we recommend using PgBarman to manage WAL archives, but are providing this facility to help repmgr to be integrated in existing environments. Implements GitHub #416.
This commit is contained in:
@@ -5765,7 +5765,6 @@ create_recovery_file(t_node_info *node_record, t_conninfo_param_list *recovery_c
|
||||
appendPQExpBuffer(&recovery_file_buf,
|
||||
"recovery_min_apply_delay = %s\n",
|
||||
config_file_options.recovery_min_apply_delay);
|
||||
|
||||
}
|
||||
|
||||
/* primary_slot_name = '...' (optional, for 9.4 and later) */
|
||||
@@ -5790,6 +5789,16 @@ create_recovery_file(t_node_info *node_record, t_conninfo_param_list *recovery_c
|
||||
free(escaped);
|
||||
}
|
||||
|
||||
/* archive_cleanup_command (optional) */
|
||||
if (config_file_options.archive_cleanup_command[0] != '\0')
|
||||
{
|
||||
char *escaped = escape_recovery_conf_value(config_file_options.archive_cleanup_command);
|
||||
appendPQExpBuffer(&recovery_file_buf,
|
||||
"archive_cleanup_command = '%s'\n",
|
||||
escaped);
|
||||
free(escaped);
|
||||
}
|
||||
|
||||
if (as_file == true)
|
||||
{
|
||||
maxpath_snprintf(recovery_file_path, "%s/%s", dest, RECOVERY_COMMAND_FILE);
|
||||
|
||||
Reference in New Issue
Block a user