EnterpriseDB/repmgr

"sslmode" not recognized in conninfo

Opened this issue · 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.

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'