Re: psql on Mac

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ozan Kahramanogullari <ozan(dot)kah(at)gmail(dot)com>
Cc: Andrej Ricnik <andrej(dot)groups(at)gmail(dot)com>, Jeff Frost <jeff(dot)frost(at)gmail(dot)com>, pgsql-novice(at)postgresql(dot)org
Subject: Re: psql on Mac
Date: 2018-10-24 13:25:37
Message-ID: 19644.1540387537@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-novice

Ozan Kahramanogullari <ozan(dot)kah(at)gmail(dot)com> 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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Ozan Kahramanogullari 2018-10-24 13:28:27 Re: psql on Mac
Previous Message Ozan Kahramanogullari 2018-10-24 13:15:15 Re: psql on Mac

Browse pgsql-novice by date

  From Date Subject
Next Message Ozan Kahramanogullari 2018-10-24 13:28:27 Re: psql on Mac
Previous Message Ozan Kahramanogullari 2018-10-24 13:15:15 Re: psql on Mac