ERROR: this node should be a standby
Closed this issue · 1 comments
Hi,
I have set 2 new servers with postgresql 12 and repmgr for the master/slave, for the primary node i manged to register with no issues, when am trying to register the standby node am having the bellow error:
INFO: connecting to local node "standbynode" (ID: 2)
ERROR: this node should be a standby (host=standbynode.domain.com user=repmgr dbname=repmgr connect_timeout=2)
seems i am missing something, can someone help?
Thanks.
From the provided information, it looks like the connection string for the standby (host=standbynode.domain.com user=repmgr dbname=repmgr connect_timeout=2
) actually points to the primary.
You can check with this command:
psql -d 'host=standbynode.domain.com user=repmgr dbname=repmgr connect_timeout=2' -c 'SELECT pg_catalog.pg_is_in_recovery()'
If it returns f
, then you probably need to ensure standbynode.domain.com
connects to the correct host.