repmgr witness register adds a witness server's node record to the repmgr metadata, and if necessary initialises the witness node by installing the repmgr extension and copying the repmgr metadata to the witness server. This command needs to be executed to enable use of the witness server with repmgrd.
When executing repmgr witness register, connection information for the cluster primary server must also be provided. repmgr will automatically use the user and dbname values defined in the conninfo string defined in the witness node's repmgr.conf, if these are not explicitly provided.
Execute with the --dry-run option to check what would happen without actually registering the witness server.
$ repmgr -f /etc/repmgr.conf witness register -h node1 INFO: connecting to witness node "node3" (ID: 3) INFO: connecting to primary node NOTICE: attempting to install extension "repmgr" NOTICE: "repmgr" extension successfully installed INFO: witness registration complete NOTICE: witness node "node3" (ID: 3) successfully registered
A witness_register event notification will be generated.