Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1ugxTj-0091yv-TX for pgsql-bugs@arkaria.postgresql.org; Wed, 30 Jul 2025 03:27:44 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1ugxTh-006Ocm-TA for pgsql-bugs@arkaria.postgresql.org; Wed, 30 Jul 2025 03:27:42 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1ugxTh-006Ocb-Jb for pgsql-bugs@lists.postgresql.org; Wed, 30 Jul 2025 03:27:41 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1ugxTf-001UOn-2L for pgsql-bugs@lists.postgresql.org; Wed, 30 Jul 2025 03:27:40 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 56U3RZXC1404834; Tue, 29 Jul 2025 23:27:35 -0400 From: Tom Lane To: Samuel Marks cc: Jacob Champion , pgsql-bugs@lists.postgresql.org Subject: Re: BUG #19002: `pg_isready` unexpectedly succeeds on incorrect `--dbname` and/or `--username` In-reply-to: References: <19002-b4d2fab028d17101@postgresql.org> Comments: In-reply-to Samuel Marks message dated "Tue, 29 Jul 2025 22:01:16 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1404832.1753846055.1@sss.pgh.pa.us> Date: Tue, 29 Jul 2025 23:27:35 -0400 Message-ID: <1404833.1753846055@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Samuel Marks 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