Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gFJAR-0004ia-2J for pgsql-novice@arkaria.postgresql.org; Wed, 24 Oct 2018 13:25:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gFJAO-0002LV-EB for pgsql-novice@arkaria.postgresql.org; Wed, 24 Oct 2018 13:25:44 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gFJAO-0002LL-7u for pgsql-novice@lists.postgresql.org; Wed, 24 Oct 2018 13:25:44 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gFJAL-0006nG-FJ for pgsql-novice@postgresql.org; Wed, 24 Oct 2018 13:25:43 +0000 Received: from pro.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id w9ODPbwe022271; Wed, 24 Oct 2018 09:25:37 -0400 From: Tom Lane To: Ozan Kahramanogullari cc: Andrej Ricnik , Jeff Frost , pgsql-novice@postgresql.org Subject: Re: psql on Mac In-reply-to: References: <19047.1540372132@sss.pgh.pa.us> <19143.1540374143@sss.pgh.pa.us> <19247.1540376672@sss.pgh.pa.us> <19344.1540378030@sss.pgh.pa.us> <19578.1540386076@sss.pgh.pa.us> Comments: In-reply-to Ozan Kahramanogullari message dated "Wed, 24 Oct 2018 15:15:15 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <19643.1540387537.1@sss.pgh.pa.us> Date: Wed, 24 Oct 2018 14:25:37 +0100 Message-ID: <19644.1540387537@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Ozan Kahramanogullari writes: >> Well, *that's* screwed up. You should complain to your local network >> manager about it. "localhost" ought to resolve to 127.0.0.1, >> or ::1/128 in IPv6-land, not something else. It's possible that >> 10.31.101.168 is your Mac's address, but that still doesn't make this >> correct behavior. So for the moment, don't use "-h localhost". > Before I go and break b.., can you guess the reason for this? No idea. But if you want to cite chapter and verse, the most authoritative reference I came across in a quick search was RFC 1912 "Common DNS Operational and Configuration Errors", http://www.faqs.org/rfcs/rfc1912.html That's pretty old, but as far as I can tell from faqs.org it has never been obsoleted, and it says that localhost ought to resolve to 127.0.0.1, period. > Though, I must admit that I am still pretty much confused about what is > going on. So, the problem seems to be the localhost that is somehow messed > up. Is that right? I'm still confused too. We have one piece of the puzzle: "-h localhost" doesn't do what we thought it would. But it's not very clear what the heck it *is* connecting to. There's apparently some Postgres server active there, because you're getting back plausible responses not "connection failed" --- but it's not your Postgres server. Do you have another way to find out what machine 10.31.101.168 actually refers to? regards, tom lane