Thread: pg_isready mandatory parameters?

pg_isready mandatory parameters?

From
"Zwettler Markus (OIZ)"
Date:

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

 

Re: pg_isready mandatory parameters?

From
Jeffrey Walton
Date:
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



Re: pg_isready mandatory parameters?

From
Tom Lane
Date:
"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