Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 6BBE2633790 for ; Wed, 5 May 2010 13:54:33 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 71001-08 for ; Wed, 5 May 2010 16:54:26 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 58F746334FE for ; Wed, 5 May 2010 13:54:26 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id o45GsOvF005254; Wed, 5 May 2010 12:54:24 -0400 (EDT) To: "Daniel J. Summers" cc: pgsql-admin@postgresql.org Subject: Re: Ubuntu 10.04 - Cannot Create TCP/IP Sockets In-reply-to: <11068.1272983067@sss.pgh.pa.us> References: <4BDE46F4.4070401@djs-consulting.com> <1CA7FF980DA3824F9A5C31532B7A40DCCDCE01FD@LCXCLMB01.LCDS.LOC.GOV> <4BDEC707.1090403@gmail.com> <14337.1272894755@sss.pgh.pa.us> <4BDED7E2.5060304@djs-consulting.com> <15098.1272896449@sss.pgh.pa.us> <4BDFA003.2080706@djs-consulting.com> <11068.1272983067@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Tue, 04 May 2010 10:24:27 -0400" Date: Wed, 05 May 2010 12:54:24 -0400 Message-ID: <5253.1273078464@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201005/74 X-Sequence-Number: 34547 I wrote: > Huh. Well, there seems to be no other possible conclusion except that > getaddrinfo() is returning something valid for "127.0.0.1" but not > for "localhost". And it's not failing outright for "localhost", but > returning a sockaddr that bind() won't actually accept. For the archives: some off-list investigation revealed that Daniel's machine is resolving "localhost" as "localhost.us", which resolves as 216.240.187.169, which of course is not a local address on his machine so the bind() fails. It's not immediately clear to me why his machine is resolving it like that --- there's no search directive in /etc/resolv.conf, and even more interestingly nslookup doesn't react that way --- but maybe Ubuntu has some other configuration setting for DNS search path. The other interesting question is what in the world made the owners of the .us domain think it'd be a good idea to offer a translation of "localhost" that's not 127.0.0.1. But anyway, this seems to be a DNS configuration problem and not a Postgres bug. regards, tom lane