hapostgres / pg_auto_failover

Postgres extension and service for automated failover and high-availability
Other
1.09k stars 114 forks source link

couldn't show monitor uri #864

Closed seaurching closed 2 years ago

seaurching commented 2 years ago

Package: pg-auto-failover

Release: 1.6.3

PostgresVersion: 10

OS: CentOS7

Execute commond show error.

bash-4.2$ /usr/pgsql-10/bin/pg_autoctl show uri --pgdata /var/lib/pgsql/10/monitor/ --json --monitor
uri: option '--monitor' requires an argument
20:30:32 29096 ERROR Failed to parse command line, see above for details.
pg_autoctl show uri: Show the postgres uri to use to connect to pg_auto_failover nodes
usage: pg_autoctl show uri  [ --pgdata --monitor --formation --json ] 

  --pgdata      path to data directory
  --monitor     show the monitor uri
  --formation   show the coordinator uri of given formation
  --json        output data in the JSON format
DimCitus commented 2 years ago

See docs at https://pg-auto-failover.readthedocs.io/en/master/ref/pg_autoctl_show_uri.html ; the --monitor <URI> option expects a connection string to connect to the monitor. I believe you want to obtain the URI to connect to the monitor, as per your current configuration, so that would be --formation monitor.

seaurching commented 2 years ago

See docs at https://pg-auto-failover.readthedocs.io/en/master/ref/pg_autoctl_show_uri.html ; the --monitor <URI> option expects a connection string to connect to the monitor. I believe you want to obtain the URI to connect to the monitor, as per your current configuration, so that would be --formation monitor.

我已经收到你的消息。这个问题困扰了我很长一段时间,非常感谢

DimCitus commented 2 years ago

我已经收到你的消息。这个问题困扰了我很长一段时间,非常感谢

I get the following translation: “I have received your message. This question has bothered me for a long time and is very grateful”. I hope it's near enough to what you were saying. I suppose we could improve the docs, I realise it's not as clear as it could be... a PR to improve on the docs for that bits would be welcome!