pg_autoctl : Get list of all formations #1080
-
Hello, Each formation is composed of two PostgreSQL nodes. I haven't found a way to list all the formations of a monitor using pg_autoctl. The only workaround I've found is to query the monitor's pg_auto_failover database directly, but I don't really like this idea [postgres@vpostgres-test3-ope:~ 02:51 PM]$ psql -p 3000 pg_auto_failover -c "select formationid, nodename, nodeport, goalstate, reportedstate, reportedpgisrunning, health from pgautofailover.node;"
formationid | nodename | nodeport | goalstate | reportedstate | reportedpgisrunning | health
-------------+-----------------------------+----------+-----------+---------------+---------------------+--------
14-isi | 14-isi-vpostgres-test1-ope | 8433 | primary | primary | t | 1
14-isi | 14-isi-vpostgres-test2-ope | 8433 | secondary | secondary | t | 1
17-test | 17-test-vpostgres-test1-ope | 8432 | primary | primary | t | 1
17-test | 17-test-vpostgres-test2-ope | 8432 | secondary | secondary | t | 1
(4 rows) Is there a pg_autoctl way to get a list of all formations for a specified monitor instance ? Many thanks !! Patrick. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
I've found the
it should be a good starting point for shell script usages. |
Beta Was this translation helpful? Give feedback.
I've found the
pg_autoctl show uri
command.. Filtering out default & monitor rows is quite a fine/fast solutionit should be a good starting point for shell script usages.