Re: DNS vs /etc/hosts

Поиск
Список
Период
Сортировка
От Michael Fuhr
Тема Re: DNS vs /etc/hosts
Дата
Msg-id 20050804224922.GA90868@winnie.fuhr.org
обсуждение исходный текст
Ответ на Re: DNS vs /etc/hosts  (Lowell.Hought@faa.gov)
Список pgsql-general
On Thu, Aug 04, 2005 at 04:39:02PM -0500, Lowell.Hought@faa.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

В списке pgsql-general по дате отправления:

Предыдущее
От: Michael Fuhr
Дата:
Сообщение: Re: DNS vs /etc/hosts
Следующее
От: Jaime Casanova
Дата:
Сообщение: Re: What causes lock?