Como faço para monitorar um banco de dados específico com pg_isready?
Instância: DSPPG10T1 Versão: 10.14 Porta: 6241
postgres@postgres # SELECT datname FROM pg_database;
datname
-----------
postgres
template1
template0
dbspg10t1
[postgres@HOSTNAME ~]$ if pg_isready -d postgres://localhost:6241/dbspg10t1; then echo "200 OK"; else echo "500 NOT OK"; fi
localhost:6241 - accepting connections
200 OK
O teste de banco de dados não existe, mas pg_isready ainda retorna ok.
[postgres@HOSTNAME ~]$ if pg_isready -d postgres://localhost:6241/test; then echo "200 OK"; else echo "500 NOT OK"; fi
localhost:6241 - accepting connections
200 OK
Isso é um problema de sintaxe?