EnterpriseDB/repmgr

repmgr 5.1 don't update primary_conninfo

Closed this issue · 4 comments

drkop commented

On standby one

  1. Change node_name and conninfo at (host=) part in repmgr.conf to new node/host name
  2. Execute:
    # repmgr standby register --force
  3. Restarting postgres

Expecting, that would change primary_conninfo in postgresql.auto.conf at (application_name=) part.

primary_conninfo is the connection address of the upstream server, which won't change if you modify the local node's conninfo.

If you want the standby to follow a different upstream node, execute repmgr standby follow --upstream-node-id=$node_id (replace $node_id with the actual ID of the upstream node). This will update primary_conninfo.

drkop commented

primary_conninfo is the connection address of the upstream server, which won't change if you modify the local node's conninfo.

If you want the standby to follow a different upstream node, execute repmgr standby follow --upstream-node-id=$node_id (replace $node_id with the actual ID of the upstream node). This will update primary_conninfo.

This is will not update "application_name" in primary_conninfo string, which should be equal to node_name, and was setuped on initial configuration.

Oh I see, the local nodename has changed.

In that case you need to execute

  • repmgr standby register --force (updates the metadata)
  • repmgr standby follow (updates primary_conninfo and restarts the local node to activate the change)

Closing as no further response received after > 28 days.