repmgr primary register — initialise a repmgr installation and register the primary node
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.
It's possibly to install the repmgr extension manually before executing
repmgr primary register; in this case repmgr will
detect the presence of the extension and skip that step.
Execute with the --dry-run option to check what would happen without
actually registering the primary.
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).
repmgr master register can be used as an alias for
repmgr primary register.
--dry-runCheck prerequisites but don't actually register the primary.
-F, --forceOverwrite an existing node record
Following event notifications will be generated:
cluster_createdprimary_register