mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-23 07:06: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
|
||||
*/
|
||||
|
||||
maxlen_snprintf(script, "rm -rf %s/pg_replslot/*",
|
||||
local_data_directory);
|
||||
r = system(script);
|
||||
if (r != 0)
|
||||
if (server_version_num >= 90400)
|
||||
{
|
||||
log_err(_("unable to empty replication slot directory %s/pg_replslot/\n"),
|
||||
local_data_directory);
|
||||
exit(ERR_BAD_RSYNC);
|
||||
maxlen_snprintf(script, "rm -rf %s/pg_replslot/*",
|
||||
local_data_directory);
|
||||
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