pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Samuel Marks <samuelmarks@gmail.com>
Cc: Jacob Champion <jacob.champion@enterprisedb.com>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #19002: `pg_isready` unexpectedly succeeds on incorrect `--dbname` and/or `--username`
Date: Tue, 29 Jul 2025 23:27:35 -0400
Message-ID: <1404833.1753846055@sss.pgh.pa.us> (raw)
In-Reply-To: <CAMfPbcY+9YR6y+8qyn5SziO8--qBjGzBQO4A-PG=Q9zYmoyL1w@mail.gmail.com>
References: <19002-b4d2fab028d17101@postgresql.org>
	<CAOYmi+mAWLmb6egMet8LFy_vDC7euHLFHQnFjL36MiFrjvySTg@mail.gmail.com>
	<CAMfPbcY+9YR6y+8qyn5SziO8--qBjGzBQO4A-PG=Q9zYmoyL1w@mail.gmail.com>

Samuel Marks <samuelmarks@gmail.com> writes:
> Hmm I suppose that works, but really I was using it as a "can i connect"
> check.

That's explicitly not its job.  Why don't you just try to connect?
Or if you want a command-line tool, consider

	psql ...connection options... -c 'select 1'

			regards, tom lane





view thread (4+ messages)

Message-ID: <1404833.1753846055@sss.pgh.pa.us>
Permalink:  ../1404833.1753846055@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1404833.1753846055@sss.pgh.pa.us

 · 

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: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, samuelmarks@gmail.com, jacob.champion@enterprisedb.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #19002: `pg_isready` unexpectedly succeeds on incorrect `--dbname` and/or `--username`
  In-Reply-To: <1404833.1753846055@sss.pgh.pa.us>

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

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