Re: psql on Mac

Tom Lane <[email protected]>
Newsgroups gmane.comp.db.postgresql.novice
Message-ID <[email protected]>
Ozan Kahramanogullari <[email protected]> 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.