LinuxCommandLibrary

pg_isready

Check the connection status of a PostgreSQL server.

TLDR

Check connection

$ pg_isready
copy


Check connection with a specific hostname and port
$ pg_isready --host=[hostname] --port=[port]
copy


Check connection displaying a message only when the connection fails
$ pg_isready --quiet
copy

Copied to clipboard