From 52328b8f331bf2496bef3d9361b779924bbbbe68 Mon Sep 17 00:00:00 2001 From: Ian Barwick Date: Tue, 27 Sep 2016 10:27:27 +0900 Subject: [PATCH] repmgr: update README --- README.md | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index c0a4fc00..366e4002 100644 --- a/README.md +++ b/README.md @@ -676,19 +676,27 @@ which enables any valid `rsync` options to be passed to that command, e.g.: ### Controlling `primary_conninfo` in `recovery.conf` -`repmgr` will create the `primary_conninfo` setting in `recovery.conf` based -on the connection parameters provided to `repmgr standby clone` and PostgreSQL's -standard connection defaults, including any environment variables set on the -local node. +The `primary_conninfo` setting in `recovery.conf` generated by `repmgr` +is generated from the following sources, in order of highest to lowest priority: + +- the upstream node's `conninfo` setting (as defined in the `repl_nodes` table) +- the connection parameters provided to `repmgr standby clone` +- PostgreSQL's standard connection defaults, including any environment variables + set on the local node. To include specific connection parameters other than the standard host, port, username and database values (e.g. `sslmode`), include these in a `conninfo`-style -tring passed to `repmgr` with `-d/--dbname` (see above for details), and/or set +string passed to `repmgr` with `-d/--dbname` (see above for details), and/or set appropriate environment variables. Note that PostgreSQL will always set explicit defaults for `sslmode` and `sslcompression`. +If `application_name` is set in the standby's `conninfo` parameter in +`repmgr.conf`, this value will be appended to `primary_conninfo`, otherwise +`repmgr` will set `application_name` to the same value as the `node_name` +parameter. + Setting up cascading replication with repmgr --------------------------------------------