public inbox for [email protected]  
help / color / mirror / Atom feed
From: Ron Johnson <[email protected]>
To: Pgsql-admin <[email protected]>
Subject: Re: Is the pg_isready database name relevant?
Date: Mon, 24 Nov 2025 13:48:40 -0500
Message-ID: <CANzqJaAAmqHBe=hERcjbGQaTuiT3KX+d_eT-ed=-e1JeiT5snA@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <CANzqJaAob4BFkhc2-w_vJrm-8KgELNnmqJJhc4oNDuY-O9+Azg@mail.gmail.com>
	<CAKFQuwZyBkjLxYt5RpPVnbO_EMAyfYwp-XhSKeebRhyNFM9SVQ@mail.gmail.com>
	<CANzqJaCSbqU3QUqMhfv5ivYww=JQNwyYnKWnEJoO_onCiCrhSg@mail.gmail.com>
	<CAKFQuwaSepzY69Jod0wsPrh8Qmu_AdMoWaQ=kq3ifJWsuD+P3w@mail.gmail.com>
	<CANzqJaD+kp+zVy71d7mS4jo+9FzKfBtDG16XKcqJQxix2YwbOg@mail.gmail.com>
	<[email protected]>

On Mon, Nov 24, 2025 at 1:30 PM Tom Lane <[email protected]> wrote:

> Ron Johnson <[email protected]> writes:
> > This is something that *should* be fixed.
>
> What do you think a fix would consist of?  The program is working
> according to the design goals that were set for it.  In particular,
> the objective is to test whether the server is up --- and if it
> answers back with 'database "foo" does not exist', then yes it's
> up.


Remove the database option.


>   But at the same time, people might not wish to clutter their
> server log with failed-connection messages, so we provide the
> necessary options to make the test connection attempt a valid one.
>

Be thorough, or be really light.

These two do the exact same thing, but ncat can't generate a spurious log
entry:
pg_isready -h foo || handle error
ncat -zw10 foo 5432 || handle error

while this does a thorough check:
psql -h foo -d bar -U snaggle -qXc "\q" || handle error

And they all execute in the same amount of time.

-- 
Death to <Redacted>, and butter sauce.
Don't boil me, I'm still alive.
<Redacted> lobster!


view thread (11+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: Is the pg_isready database name relevant?
  In-Reply-To: <CANzqJaAAmqHBe=hERcjbGQaTuiT3KX+d_eT-ed=-e1JeiT5snA@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox