From: | Michael Fuhr <mike(at)fuhr(dot)org> |
---|---|
To: | Lowell(dot)Hought(at)faa(dot)gov |
Cc: | pgsql-general(at)postgresql(dot)org, Richard_D_Levine(at)raytheon(dot)com |
Subject: | Re: DNS vs /etc/hosts |
Date: | 2005-08-04 22:49:22 |
Message-ID: | 20050804224922.GA90868@winnie.fuhr.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Thu, Aug 04, 2005 at 04:39:02PM -0500, Lowell(dot)Hought(at)faa(dot)gov wrote:
> The difference must have to do with the functions that differ in the
> different versions of psql. In looking through the code for version 8.0
> in the file /interfaces/libpq/ip.c, the function that resolves hostname is
> "getaddrinfo". Is this the same function that was used in version 7.2,
> and if not, how does it differ? Is there something on my machine that I
> can configure?
Good catch -- the use of getaddrinfo() appears to have been added
in 7.4. I see calls to inet_aton() and gethostbyname() in earlier
versions, so maybe that explains the difference. A simple test
program should be able to confirm or refute that hypothesis. The
tcpdump output I suggested in another message should show exactly
what queries are being made and what responses are being received.
Different systems have different resolver customizations; you'll
have to check your local documentation. I'd start with "man
resolv.conf". I'd especially look for options that control if and
when queries for the top-level domain "hostname" are made when
queries for "hostname.domain" fail. You might also want to examine
your domain search list.
--
Michael Fuhr
From | Date | Subject | |
---|---|---|---|
Next Message | Brent Wood | 2005-08-04 22:56:26 | Re: dbf to pgsql |
Previous Message | Michael Fuhr | 2005-08-04 22:30:52 | Re: DNS vs /etc/hosts |