Delete any replication slots copied by pg_rewind

If --force-rewind is used in conjunction with "repmgr node rejoin",
any replication slots present on the source node will be copied too;
it's essential to remove these to prevent stale slots being extant
when the node starts up.

We do this at file system level *before* the server starts to minimize
the risk of any problems.

Addresses GitHub #334
This commit is contained in:
Ian Barwick
2017-11-24 11:11:24 +09:00
parent da93dd1f57
commit 3a8ee126f3
3 changed files with 67 additions and 6 deletions

View File

@@ -26,5 +26,5 @@ extern int check_dir(char *path);
extern bool create_dir(char *path);
extern bool is_pg_dir(char *path);
extern bool create_pg_dir(char *path, bool force);
extern int rmdir_recursive(char *path);
#endif