Various fixes to "repmgr node rejoin"

This commit is contained in:
Ian Barwick
2017-09-01 11:30:31 +09:00
parent f9f05158d2
commit edb74ccef9
3 changed files with 44 additions and 14 deletions

View File

@@ -1667,15 +1667,20 @@ do_node_rejoin(void)
command.data,
&command_output);
termPQExpBuffer(&command_output);
termPQExpBuffer(&command);
if (ret != 0)
if (ret == false)
{
log_error(_("unable to execute pg_rewind"));
log_detail(_("see preceding output for details"));
log_detail("%s", command_output.data);
termPQExpBuffer(&command_output);
exit(ERR_BAD_CONFIG);
}
termPQExpBuffer(&command_output);
/* Restore any previously archived config files */
_do_node_restore_config();