Ozan Kahramanogullari <ozan.kah@gmail.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