Maintaining your cluster

Maintain your cluster with patronictl utility script that is located in /usr/bin.

Procedure

Run the following command:
patronictl -c <PATH>/patroni_config.yaml <COMMAND> <CLUSTER_NAME>
Where,
  • <PATH>

    The Patroni configuration file name with file path.

  • <COMMAND>

    The patronictl command.

  • <CLUSTER_NAME>

    The cluster name used in patroni_config.yaml file.

The following options are available on patronictl utility:
Commands:
  configure    Create configuration file
  dsn          Generate a dsn for the provided member, defaults to a dsn of...
  edit-config  Edit cluster configuration
  failover     Failover to a replica
  flush        Flush scheduled events
  list         List the Patroni members for a given Patroni
  pause        Disable auto failover
  query        Query a Patroni PostgreSQL member
  reinit       Reinitialize cluster member
  reload       Reload cluster member configuration
  remove       Remove cluster from DCS
  restart      Restart cluster member
  resume       Resume auto failover
  scaffold     Create a structure for the cluster in DCS
  show-config  Show cluster configuration
  switchover   Switchover to a replica
  version      Output version of patronictl command or a running Patroni...