mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-26 00:26:30 +00:00
pg_replslot will only exist in 9.4 and later
We need to clean this up regardless of whether "use_replication_slots" is set.
This commit is contained in:
17
repmgr.c
17
repmgr.c
@@ -1795,14 +1795,17 @@ stop_backup:
|
|||||||
* functionality of replication slots
|
* functionality of replication slots
|
||||||
*/
|
*/
|
||||||
|
|
||||||
maxlen_snprintf(script, "rm -rf %s/pg_replslot/*",
|
if (server_version_num >= 90400)
|
||||||
local_data_directory);
|
|
||||||
r = system(script);
|
|
||||||
if (r != 0)
|
|
||||||
{
|
{
|
||||||
log_err(_("unable to empty replication slot directory %s/pg_replslot/\n"),
|
maxlen_snprintf(script, "rm -rf %s/pg_replslot/*",
|
||||||
local_data_directory);
|
local_data_directory);
|
||||||
exit(ERR_BAD_RSYNC);
|
r = system(script);
|
||||||
|
if (r != 0)
|
||||||
|
{
|
||||||
|
log_err(_("unable to empty replication slot directory %s/pg_replslot/\n"),
|
||||||
|
local_data_directory);
|
||||||
|
exit(ERR_BAD_RSYNC);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user