ltcluster primary register

ltcluster primary register — initialise a ltcluster installation and register the primary node


ltcluster primary register registers a primary node in a streaming replication cluster, and configures it for use with ltcluster, including installing the ltcluster extension. This command needs to be executed before any standby nodes are registered.


ltcluster will attempt to install the ltcluster extension as part of this command, however this will fail if the ltcluster user is not a superuser.

It's possible to install the ltcluster extension manually before executing ltcluster primary register; in this case ltcluster 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 ltcluster stores the configuration file location in the ltcluster metadata for use when ltcluster is executed remotely (e.g. during ltcluster standby switchover). ltcluster 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. ./ltcluster.conf might be converted to /path/to/./ltcluster.conf, whereas you'd normally write /path/to/ltcluster.conf).

ltcluster master register can be used as an alias for ltcluster primary register.

User permission requirements

The ltcluster user must be a superuser in order for ltcluster to be able to install the ltcluster extension.

If this is not the case, the ltcluster extension can be installed manually before executing ltcluster primary register.

A future ltcluster release will enable the provision of a --superuser name for the installation of the extension.



Check prerequisites but don't actually register the primary.

-F, --force

Overwrite an existing node record

Event notifications

Following event notifications will be generated:

  • cluster_created
  • primary_register