mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-26 00:26:30 +00:00
Drop a previously created replication slot if base backup fails for any reason
Per Github #129
This commit is contained in:
7
repmgr.c
7
repmgr.c
@@ -1785,9 +1785,16 @@ stop_backup:
|
|||||||
/* If the backup failed then exit */
|
/* If the backup failed then exit */
|
||||||
if (r != 0)
|
if (r != 0)
|
||||||
{
|
{
|
||||||
|
/* If a replication slot was previously created, drop it */
|
||||||
|
if (options.use_replication_slots)
|
||||||
|
{
|
||||||
|
drop_replication_slot(upstream_conn, repmgr_slot_name);
|
||||||
|
}
|
||||||
|
|
||||||
log_err(_("unable to take a base backup of the master server\n"));
|
log_err(_("unable to take a base backup of the master server\n"));
|
||||||
log_warning(_("destination directory (%s) may need to be cleaned up manually\n"),
|
log_warning(_("destination directory (%s) may need to be cleaned up manually\n"),
|
||||||
local_data_directory);
|
local_data_directory);
|
||||||
|
|
||||||
PQfinish(upstream_conn);
|
PQfinish(upstream_conn);
|
||||||
exit(retval);
|
exit(retval);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user