Search Postgresql Archives

Re: DNS vs /etc/hosts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Aug 04, 2005 at 04:39:02PM -0500, Lowell.Hought@xxxxxxx 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

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux