1.3. Ltcluster user and metadata

In order to effectively manage a replication cluster, ltcluster needs to store information about the servers in the cluster in a dedicated database schema. This schema is automatically created by the ltcluster extension, which is installed during the first step in initializing a ltcluster-administered cluster (ltcluster primary register) and contains the following objects:

Tables

  • ltcluster.events: records events of interest
  • ltcluster.nodes: connection and status information for each server in the replication cluster
  • ltcluster.monitoring_history: historical standby monitoring information written by ltclusterd

Views

  • ltcluster.show_nodes: based on the table ltcluster.nodes, additionally showing the name of the server's upstream node
  • ltcluster.replication_status: when ltclusterd's monitoring is enabled, shows current monitoring status for each standby.

The ltcluster metadata schema can be stored in an existing database or in its own dedicated database. Note that the ltcluster metadata schema cannot reside on a database server which is not part of the replication cluster managed by ltcluster.

A database user must be available for ltcluster to access this database and perform necessary changes. This user does not need to be a superuser, however some operations such as initial installation of the ltcluster extension will require a superuser connection (this can be specified where required with the command line option --superuser).