pg_isready mandatory parameters?

Started by Zwettler Markus (OIZ)over 3 years ago3 messagesgeneral
Jump to latest
#1Zwettler Markus (OIZ)
Markus.Zwettler@zuerich.ch

I found this in PG14 ==>

bash-4.4$ ./pg_isready --version
pg_isready (PostgreSQL) 14.2
bash-4.4$ ./pg_isready
/var/run/postgresql:5432 - no attempt
bash-4.4$ ./pg_isready -h localhost
localhost:5432 - no attempt
bash-4.4$ ./pg_isready -h localhost -p 5432
localhost:5432 - no attempt
bash-4.4$ ./pg_isready -h localhost -p 5432 -d postgres
localhost:5432 - no attempt
bash-4.4$ ./pg_isready -h localhost -p 5432 -d postgres -U postgres
localhost:5432 - accepting connections

I always thought all parameters are optional? No?

Thanks,
Markus

#2Jeffrey Walton
noloader@gmail.com
In reply to: Zwettler Markus (OIZ) (#1)
Re: pg_isready mandatory parameters?

On Fri, Nov 11, 2022 at 12:09 PM Zwettler Markus (OIZ)
<Markus.Zwettler@zuerich.ch> wrote:

I found this in PG14 è

bash-4.4$ ./pg_isready --version

pg_isready (PostgreSQL) 14.2

bash-4.4$ ./pg_isready

/var/run/postgresql:5432 - no attempt

bash-4.4$ ./pg_isready -h localhost

localhost:5432 - no attempt

bash-4.4$ ./pg_isready -h localhost -p 5432

localhost:5432 - no attempt

bash-4.4$ ./pg_isready -h localhost -p 5432 -d postgres

localhost:5432 - no attempt

bash-4.4$ ./pg_isready -h localhost -p 5432 -d postgres -U postgres

localhost:5432 - accepting connections

I always thought all parameters are optional? No?

Optional or ignored???

This may be more what you are looking for:
https://github.com/noloader/pg_check_conn

Jeff

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Zwettler Markus (OIZ) (#1)
Re: pg_isready mandatory parameters?

"Zwettler Markus (OIZ)" <Markus.Zwettler@zuerich.ch> writes:

I always thought all parameters are optional? No?

They're optional, but maybe there is something wrong with
the default values (wherever you're getting those from).
pg_isready isn't really chartered to tell you about that,
but I wonder what you get from psql with the same command
line option sets.

regards, tom lane