pg_isready
Check the connection status of a PostgreSQL server. More information: <https://www.postgresql.org/docs/current/app-pg-isready.html>.
Install
- All systems
-
curl cmd.cat/pg_isready.sh
- Debian
-
apt-get install postgresql-client-9.6
- Ubuntu
-
apt-get install postgresql-client-9.3
- Arch Linux
-
pacman -S postgresql-old-upgrade
- Kali Linux
-
apt-get install postgresql-client-11
- CentOS
-
yum install postgresql-upgrade
- Fedora
-
dnf install postgresql-upgrade
- Windows (WSL2)
-
sudo apt-get update
sudo apt-get install postgresql-client-9.3
- Raspbian
-
apt-get install postgresql-client-9.5
- Dockerfile
- dockerfile.run/pg_isready
Check the connection status of a PostgreSQL server. More information: <https://www.postgresql.org/docs/current/app-pg-isready.html>.
-
Check connection:
pg_isready
-
Check connection with a specific hostname and port:
pg_isready --host=hostname --port=port
-
Check connection displaying a message only when the connection fails:
pg_isready --quiet
© tl;dr; authors and contributors