pgpingworks by reading yourPGCONNenvironment variable and attempting to connect to it.- If it's able to establish a connection with the provided Postgres server and
credentials, it exits with a
0status. - If it cannot, it prints the error to
stdoutand exits with a non-zero status.
PGCONN=postgres://postgres@localhost:5432/postgres?sslmode=disable pgping
$>2018/03/09 12:18:11 Postgres server READY and accepting connections...