diff --git a/doc/appendix-release-notes.xml b/doc/appendix-release-notes.xml index 67009d12..ce8443bd 100644 --- a/doc/appendix-release-notes.xml +++ b/doc/appendix-release-notes.xml @@ -41,7 +41,13 @@ Configuration file parsing has been made stricter - String parameters should always be enclosed in single quotes. + &repmgr; now parses configuration files + in the same way that PostgreSQL itself does, which means some files used with + earlier &repmgr; versions may need slight modification before they can be used + with &repmgr; 5 and later. + + + The main change is that string parameters should always be enclosed in single quotes. For example, in &repmgr; 4.4 and earlier, the following repmgr.conf diff --git a/doc/configuration-file.xml b/doc/configuration-file.xml index 3b39b4e6..507b7d7b 100644 --- a/doc/configuration-file.xml +++ b/doc/configuration-file.xml @@ -31,6 +31,8 @@ format + + repmgr.conf is a plain text file with one parameter/value combination per line. @@ -39,14 +41,10 @@ Whitespace is insignificant (except within a quoted parameter value) and blank lines are ignored. Hash marks (#) designate the remainder of the line as a comment. Parameter values that are not simple identifiers or numbers should be single-quoted. - Note that single quote cannot be embedded in a parameter value. - - - &repmgr; will interpret double-quotes as being part of a string value; only use single quotes - to quote parameter values. - - + + To embed a single quote in a parameter value, write either two quotes (preferred) or backslash-quote. + Example of a valid repmgr.conf file: @@ -56,9 +54,32 @@ node_id=1 node_name= node1 conninfo ='host=node1 dbname=repmgr user=repmgr connect_timeout=2' -data_directory = /var/lib/pgsql/12/data +data_directory = '/var/lib/pgsql/12/data' + + + + Beginning with repmgr 5.0, configuration + file parsing has been tightened up and now matches the way PostgreSQL + itself parses configuration files. + + + This means repmgr.conf files used with earlier &repmgr; + versions may need slight modification before they can be used with &repmgr; 5 + and later. + + + The main change is that &repmgr; requires most string values to be + enclosed in single quotes. For example, this was previously valid: + +conninfo=host=node1 user=repmgr dbname=repmgr connect_timeout=2 + but must now be changed to: + +conninfo='host=node1 user=repmgr dbname=repmgr connect_timeout=2' + + +