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 1ldVUy-0008B6-Ie for pgsql-hackers@arkaria.postgresql.org; Mon, 03 May 2021 10:08:20 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ldVUw-0002Gh-A5 for pgsql-hackers@arkaria.postgresql.org; Mon, 03 May 2021 10:08:18 +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 1ldVUv-0002G2-Go for pgsql-hackers@lists.postgresql.org; Mon, 03 May 2021 10:08:18 +0000 Received: from forward4-smtp.messagingengine.com ([66.111.4.238]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ldVUp-0005Ro-SJ for pgsql-hackers@postgresql.org; Mon, 03 May 2021 10:08:16 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailforward.nyi.internal (Postfix) with ESMTP id 588CF1940B7F; Mon, 3 May 2021 06:08:08 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Mon, 03 May 2021 06:08:08 -0400 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:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=cQBaio2fbWmtxythNRZaoyS/d6Kx40E4Q0l9EZRAR Ec=; b=ASdWXnGqlPeK7eB4Vsk2QptSeqPudIo4eMQR8TgGRn+DZp96eAJfYDAdf 1oAjSzof0f4YY8CxyisMxQ338n0QYyYVqP8uahVeZQ87u1EXZu7OD/yTqx4K6bTU UIVc1hyhvfWZTIUpn2O79bh6dOhYV4VokISDY1NZ2LLqzO0BUNIYIGZfPVpmcFR6 467C09uKbh4xIPCOCWv09YJLFfaoW9XfRX1Kp1sekEX0VgRt1bes/3vq9qakAk08 9sAuc5VxQQoLmGetvwPdx9NbwZVpQpUEEcU1B3+D+zvMCum1ClGlgD80AAkTI/cf g6exehzpV20xlZ/ifqasSK00bZSUw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrvdefgedgvdehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepuffvfhfhkffffgggjggtgfesthejredttdefjeenucfhrhhomheprfgvthgv rhcugfhishgvnhhtrhgruhhtuceophgvthgvrhdrvghishgvnhhtrhgruhhtsegvnhhtvg hrphhrihhsvggusgdrtghomheqnecuggftrfgrthhtvghrnhepleevheehueeiudeiteei tdekueetleefteejffeiffdugedvffdvffdtiedvueeknecukfhppeeluddrudegrddvvd egrdduvddtnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhho mhepphgvthgvrhdrvghishgvnhhtrhgruhhtsegvnhhtvghrphhrihhsvggusgdrtghomh X-ME-Proxy: Received: from laptop206oxuk.local (p5b0ee078.dip0.t-ipconnect.de [91.14.224.120]) by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 3 May 2021 06:08:06 -0400 (EDT) Subject: Re: strange error reporting To: Tom Lane , Robert Haas Cc: "pgsql-hackers@postgresql.org" References: <717401.1611163169@sss.pgh.pa.us> <718535.1611164867@sss.pgh.pa.us> <798280.1611192827@sss.pgh.pa.us> From: Peter Eisentraut Message-ID: <0621c8e2-6b87-219d-2eaf-ae1a2cb822b2@enterprisedb.com> Date: Mon, 3 May 2021 12:08:04 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.10.0 MIME-Version: 1.0 In-Reply-To: <798280.1611192827@sss.pgh.pa.us> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 21.01.21 02:33, Tom Lane wrote: >>> I'd be inclined to spell it "connection to server at ... failed", >>> but that sort of wording is surely also possible. > >> "connection to server" rather than "connection to database" works for >> me; in fact, I think I like it slightly better. > > If I don't hear any other opinions, I'll change these messages to > > "connection to server at socket \"%s\" failed:" > "connection to server at \"%s\" (%s), port %s failed:" > > (or maybe "server on socket"? "at" sounds right for the IP address > case, but it feels a little off in the socket pathname case.) I was just trying some stuff with PG14, which led me to this thread. I find these new error messages to be more distracting than before in some cases. For example: PG13: clusterdb: error: could not connect to database typo: FATAL: database "typo" does not exist PG14: clusterdb: error: connection to server on socket "/tmp/.s.PGSQL.65432" failed: FATAL: database "typo" does not exist Throwing the socket address in there seems a bit distracting and misleading, and it also pushes off the actual information very far to the end. (Also, in some cases the socket path is very long, making the actual information even harder to find.) By the time you get to this error, you have already connected, so mentioning the server address seems secondary at best.