repmgr primary register registers a primary node in a streaming replication cluster, and configures it for use with repmgr, including installing the repmgr extension. This command needs to be executed before any standby nodes are registered.
Execute with the --dry-run option to check what would happen without actually registering the primary.
repmgr master register can be used as an alias for repmgr primary register.
Note: If providing the configuration file location with -f/--config-file, avoid using a relative path, as repmgr stores the configuration file location in the repmgr metadata for use when repmgr is executed remotely (e.g. during repmgr standby switchover). repmgr will attempt to convert the a relative path into an absolute one, but this may not be the same as the path you would explicitly provide (e.g. ./repmgr.conf might be converted to /path/to/./repmgr.conf, whereas you'd normally write /path/to/repmgr.conf).
Check prerequisites but don't actually register the primary.
Overwrite an existing node record
A primary_register event notification will be generated.