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 1l2IAn-0001sU-IZ for pgsql-hackers@arkaria.postgresql.org; Wed, 20 Jan 2021 18:25:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1l2IAm-0003Pd-9s for pgsql-hackers@arkaria.postgresql.org; Wed, 20 Jan 2021 18:25:40 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l2IAm-0003PW-1a for pgsql-hackers@lists.postgresql.org; Wed, 20 Jan 2021 18:25:40 +0000 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l2IAf-0007mv-SJ for pgsql-hackers@postgresql.org; Wed, 20 Jan 2021 18:25:38 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.west.internal (Postfix) with ESMTP id 530961BDE; Wed, 20 Jan 2021 13:25:32 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Wed, 20 Jan 2021 13:25:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=7p5Wyfqs39PG8HCHWTCoZgVT+hCPZrcX1bWgPhAUQ+0=; b=K4NFVuhN wgALYw5O8Bqt5EQyzltLmskH+HwSnFJ19/iOVtGJe0GR/YPwfQzmWhza5QsIHP7L zj58h3uUjn/FHAKpnzyGIg/vjCuCVzD98dK4OhkjKJyZOYUR2hfMSMLgCnmUYN/s UigC6inQmnmFqZqixrGf3WAvVig/fhNx1ndi66WJHW95xt5zIUmargH5TErG/eBj sYYhDcyMBhStlzdZ4qi+MuZ7O1gfeHEZMGfQpzE3AsnC1U97m3IiuXicFeu/JC5g 1yeolkZLlIR+fFFsI2U5Qpa4PukheYdZ3UMQ1ZdWfs6A9v0LT1k8Si6HAFr67DAW f+0cpMHfdy1nhw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledruddvgdduudegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfggtggugfgjfgesthekredttderudenucfhrhhomheptehlvhgr rhhoucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh eqnecuggftrfgrthhtvghrnhepueffhfejieeuueffgedvudekgeeltdeviedvieeufeei ieevgfetheeufeethedvnecukfhppeduledtrdelhedrudelrddujeejnecuvehluhhsth gvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghlvhhhvghrrhgvsegr lhhvhhdrnhhoqdhiphdrohhrgh X-ME-Proxy: Received: from perhan.alvh.no-ip.org (unknown [190.95.19.177]) by mail.messagingengine.com (Postfix) with ESMTPA id 6D2541080069; Wed, 20 Jan 2021 13:25:30 -0500 (EST) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 719B92A0FBF; Wed, 20 Jan 2021 15:25:26 -0300 (-03) Date: Wed, 20 Jan 2021 15:25:26 -0300 From: Alvaro Herrera To: Robert Haas Cc: Tom Lane , "pgsql-hackers@postgresql.org" Subject: Re: strange error reporting Message-ID: <20210120182526.GA19606@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2021-Jan-20, Robert Haas wrote: > On Wed, Jan 20, 2021 at 12:19 PM Tom Lane wrote: > > Robert Haas writes: > > > I just made the mistake of trying to run pgbench without first running > > > createdb and got this: > > > > > pgbench: error: connection to database "" failed: could not connect to > > > socket "/tmp/.s.PGSQL.5432": FATAL: database "rhaas" does not exist > > > > > This looks pretty bogus because (1) I was not attempting to connect to > > > a database whose name is the empty string [...] > > > > I'm not sure about the empty DB name in the first part (presumably > > that's from pgbench, so what was your pgbench command exactly?). > > I think it was just 'pgbench -i 40'. For sure, I didn't specify a database name. That's because pgbench reports the input argument dbname, but since you didn't specify anything, then PQconnectdbParams() uses the libpq behavior. I think we'd have to use PQdb() instead. -- Álvaro Herrera Valdivia, Chile