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:
Ian Barwick
2015-11-30 15:40:43 +09:00
parent 864d57953a
commit 4db0efab47

View File

@@ -1833,14 +1833,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);
}
} }
} }