"standby clone": fail if recovery.conf could not be created.

Addresses GitHub #296
This commit is contained in:
Ian Barwick
2017-08-31 23:26:55 +09:00
parent 00391ba95d
commit a0937e959f

View File

@@ -4087,7 +4087,16 @@ stop_backup:
/* Finally, write the recovery.conf file */
create_recovery_file(local_data_directory, &recovery_conninfo);
if (create_recovery_file( local_data_directory, &recovery_conninfo) == false)
{
/* create_recovery_file() will log an error */
log_notice(_("unable to create recovery.conf; see preceding error messages\n"));
log_hint(_("data directory (\"%s\") may need to be cleaned up manually\n"),
local_data_directory);
PQfinish(source_conn);
exit(ERR_BAD_CONFIG);
}
if (mode == barman)
{