diff --git a/HISTORY b/HISTORY
index 9fdfa0e4..9cc1ea56 100644
--- a/HISTORY
+++ b/HISTORY
@@ -23,6 +23,7 @@
repmgr: prevent a witness server being registered on the cluster primary (John)
repmgr: ensure BDR2-specific functionality cannot be used on
BDR3 and later (Ian)
+ repmgr: canonicalize the data directory path (Ian)
repmgrd: monitor standbys attached to primary (Ian)
repmgrd: add "primary visibility consensus" functionality (Ian)
repmgrd: fix memory leak which occurs while the monitored PostgreSQL
diff --git a/configfile.c b/configfile.c
index 0e5f93b0..d974895f 100644
--- a/configfile.c
+++ b/configfile.c
@@ -502,10 +502,15 @@ _parse_config(t_configuration_options *options, ItemList *error_list, ItemList *
else if (strcmp(name, "conninfo") == 0)
strncpy(options->conninfo, value, MAXLEN);
else if (strcmp(name, "data_directory") == 0)
+ {
strncpy(options->data_directory, value, MAXPGPATH);
+ canonicalize_path(options->data_directory);
+ }
else if (strcmp(name, "config_directory") == 0)
+ {
strncpy(options->config_directory, value, MAXPGPATH);
-
+ canonicalize_path(options->config_directory);
+ }
else if (strcmp(name, "replication_user") == 0)
{
if (strlen(value) < sizeof(options->replication_user))
diff --git a/doc/appendix-release-notes.xml b/doc/appendix-release-notes.xml
index 872842c0..cb08a81e 100644
--- a/doc/appendix-release-notes.xml
+++ b/doc/appendix-release-notes.xml
@@ -237,6 +237,16 @@
+
+
+ &repmgr;: canonicalize the data directory path when parsing the configuration file, so
+ the provided path matches the path PostgreSQL reports as its data directory.
+ Otherwise, if e.g. the data directory is configured with a trailing slash,
+ repmgr node check --data-directory-config
+ will return a spurious error.
+
+
+
&repmgrd;: fix memory leak which occurs while the monitored PostgreSQL node is not