mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-22 22:56:29 +00:00
Canonicalize the data directory path when parsing the configuration file
This ensures the provided path matches the path PostgreSQL reports as its data directory.
This commit is contained in:
1
HISTORY
1
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
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -237,6 +237,16 @@
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>
|
||||
&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,
|
||||
<link linkend="repmgr-node-check"><command>repmgr node check --data-directory-config</command></link>
|
||||
will return a spurious error.
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>
|
||||
&repmgrd;: fix memory leak which occurs while the monitored PostgreSQL node is <emphasis>not</emphasis>
|
||||
|
||||
Reference in New Issue
Block a user