hapostgres / pg_auto_failover

Postgres extension and service for automated failover and high-availability
Other
1.09k stars 114 forks source link

Enabling new monitor fails due to nodeid of postgres already exists in monitor. #843

Open allanharry opened 2 years ago

allanharry commented 2 years ago

Hi

Running several clusters within a single monitor. Try to move existing clusters from one monitor to another monitor in third site. Some succeeds, but in the case of nodeid of postgres already exists in new monitor then it fails due to duplicate id's. Ex. leaving existing monitor on postgres using: Standby node (node6): "pg_autoctl disable monitor --force" OK Primary node (node5): " pg_autoctl disable monitor --force" OK

Now joining new monitor where node5 and node6 already in use by another cluster (pg_hba.conf entries adjusted for this): Primary node: "pg_autoctl enable monitor postgres://autoctl_node:xxxxxxxx@new_monitor_ip:5432/pg_auto_failover Fails with issue that node5 already exists in new monitor.

How can I force allocation of new unused nodeid's when enabling the new monitor ?

pg_auto_failover_12-1.6.1-2.rhel8.x86_64 running postgres 12.5 on redhat 8.4

Regards Allan