Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oUHHH-0000zM-Qt for pgsql-general@arkaria.postgresql.org; Sat, 03 Sep 2022 00:44:52 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oUHHG-0002D8-E8 for pgsql-general@arkaria.postgresql.org; Sat, 03 Sep 2022 00:44:50 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oUHHE-0002Cz-Oe for pgsql-general@lists.postgresql.org; Sat, 03 Sep 2022 00:44:50 +0000 Received: from wout4-smtp.messagingengine.com ([64.147.123.20]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oUHH7-0000Ii-C5 for pgsql-general@lists.postgresql.org; Sat, 03 Sep 2022 00:44:48 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id 6F7A93200917; Fri, 2 Sep 2022 20:44:37 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Fri, 02 Sep 2022 20:44:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm3; t=1662165876; x= 1662252276; bh=0Zz4vDYAhopy8NN1KqjpzpKz2+vJjIbBPbXH4YsBqtY=; b=l CtPAeWv6LRi/B6mcAKE9kUZr+V4ujiVMoSzFQqkrGtmyPxDnxJF+Bs2yP9/lMC7S 9PH93OGun60yJca+NbPcqYY31aTEEy6CMXH7Jkzn/td3iDOLk4O7sEowuppqRbHw +zlAY9ufwYpO+SuwSVuF84maIg0LWQufCjTaihao9b4sseGu9mENLIwNSwAbUI6C MOdCeNaIliwbb4QGKDyaAbRVhDAHgXfapoxtZYCM5HazXCj5WiYom0au3Kgog3Zp c483n0K60+yLvI0oQ1Ca1WmFNbugb1LJkwVe6dCiveVjujcfBj9jfKDqujhsE8aO pJ/OlCs7QjeeOGlRegQMA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:date:feedback-id:feedback-id:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; t=1662165876; x=1662252276; bh=0 Zz4vDYAhopy8NN1KqjpzpKz2+vJjIbBPbXH4YsBqtY=; b=VDIrXY+GlLw0hNyta 2zero0yXI4+YYuophNALrtUiYzz/fPKp+MmWgQl+8c1LQJG5CvPQBL5XwZ4n9Zcl BFtJ5BXNzCblW/ONJq9VGWVxH/2GMl5TV1yuen43nQ4SAbQThcXJ/K+JZ0Jw7ls9 HtGfaTpvIG6hPQoAL1KnnHj6I8BDc82EgHExbffXHJNANmaFjuH2OBhf6KxL9Fdw Qc04nvOhuIb66zZmLR5rlaOjhhoBR2WRCbb1rYC2a/L2pZbcGJoFc7QCsROi6jlB fkAfByoHICEIYKP7Zk1mQSLYB/QYSsL2n1JevGsRKlXS1MqiEmt+5Xyhn8or76kW IF8jA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrvdeluddggedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefkffggfgfuvfhfhfgjtgfgsehtke ertddtfeejnecuhfhrohhmpeetughrihgrnhcumfhlrghvvghruceorggurhhirghnrdhk lhgrvhgvrhesrghklhgrvhgvrhdrtghomheqnecuggftrfgrthhtvghrnhepudfgueelge evfffhgeeljeehhfettdegieelgefgheefffefveegjedtueetffdtnecuvehluhhsthgv rhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprggurhhirghnrdhklhgrvh gvrhesrghklhgrvhgvrhdrtghomh X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 2 Sep 2022 20:44:36 -0400 (EDT) Message-ID: <67c3e292-e33a-cad9-bc49-f480b0a31f50@aklaver.com> Date: Fri, 2 Sep 2022 17:44:35 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.13.0 Subject: Re: Determine if a user and database are available Content-Language: en-US To: Ron , pgsql-general@lists.postgresql.org References: <1229132.1662157263@sss.pgh.pa.us> <3698b162-8146-cc59-0da4-390d2c6f8189@gmail.com> From: Adrian Klaver In-Reply-To: <3698b162-8146-cc59-0da4-390d2c6f8189@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 9/2/22 17:33, Ron wrote: > On 9/2/22 17:21, Tom Lane wrote: >> Jeffrey Walton writes: >>> I have another beginner question. I am trying to use pg_isready to >>> determine if a database and user are present. The program seems to >>> always succeed, even when I delete the user or the database. >> That's a feature actually.  The intended use of pg_isready is to >> find out if the server is alive, not whether any particular user >> or database name is correct. > > Then what's the point of the --username=USERNAME connection option? > My guess so you can specify a 'test' user that you can track in the logs. -- Adrian Klaver adrian.klaver@aklaver.com