维护集群
使用 /usr/bin中的 patronictl 实用程序脚本维护集群。
程序
运行以下命令:
patronictl -c <PATH>/patroni_config.yaml <COMMAND> <CLUSTER_NAME>其中,- 《PATH》
包含文件路径的
Patroni配置文件名。 - 《通信》
patronictl命令。 - <CLUSTER_NAME>
patroni_config.yaml 文件中使用的集群名称。
patronictl 实用程序上可用: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...