Skip to content

pg_autoctl : Get list of all formations #1080

Answered by PatrickBzh
PatrickBzh asked this question in Q&A
Discussion options

You must be logged in to vote

I've found the pg_autoctl show uri command.. Filtering out default & monitor rows is quite a fine/fast solution

pg_autoctl show uri --pgdata "/pg_data/17-monitor/instance" |grep -Ev ' (monitor|default) '
        Type |    Name | Connection String
-------------+---------+-------------------------------
   formation | 17-test | postgres://vpostgres-test2-ope.ifremer.fr:8432,vpostgres-test1-ope.ifremer.fr:8432/postgres?target_session_attrs=read-write&sslmode=require
   formation |  14-isi | postgres://vpostgres-test2-ope.ifremer.fr:8433,vpostgres-test1-ope.ifremer.fr:8433/postgres?target_session_attrs=read-write&sslmode=require

it should be a good starting point for shell script usages.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@dimitri
Comment options

@PatrickBzh
Comment options

Answer selected by PatrickBzh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants