repmgr icon indicating copy to clipboard operation
repmgr copied to clipboard

"sslmode" not recognized in conninfo

Open nagylzs opened this issue 4 years ago • 1 comments

Given this repmgr.conf (repmgr 5.2):

node_id=1
node_name = 'node01'
conninfo = 'host=node01 user=repmgr dbname=repmgr connect_timeout=2'
data_directory = '/opt/postgresql/data'
sslmode = 'require'

The "repmgr primary register" command gives this:

WARNING: the following problems were found in the configuration file:
  sslmode='require': unknown name/value pair provided; ignoring
INFO: connecting to primary database...
INFO: "repmgr" extension is already installed
NOTICE: primary node record (ID: 1) registered

I think that sslmode=require is a valid option, it should be recognized.

nagylzs avatar Jan 08 '22 15:01 nagylzs

This is correct behaviour -sslmode is a libpq connection parameter, not a repmgr configuration item, so you should put it in the conninfo string, e.g:

conninfo = 'host=node01 user=repmgr dbname=repmgr connect_timeout=2 sslmode=require'

ibarwick avatar Jan 10 '22 01:01 ibarwick