Re: DNS vs /etc/hosts

From: Lowell(dot)Hought(at)faa(dot)gov
To: Michael Fuhr <mike(at)fuhr(dot)org>
Cc: pgsql-general(at)postgresql(dot)org, pgsql-general-owner(at)postgresql(dot)org, Richard_D_Levine(at)raytheon(dot)com
Subject: Re: DNS vs /etc/hosts
Date: 2005-08-04 21:39:02
Message-ID: OFD1B551F4.083ED5E7-ON86257053.007677D7-86257053.0076D407@faa.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Your assessment is correct ... the same version of
psql behaves the same on different machines, and different
versions of psql behave differently on the same machine.

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?

Michael Fuhr <mike(at)fuhr(dot)org>
Sent by: pgsql-general-owner(at)postgresql(dot)org
08/04/2005 03:25 PM

To
Richard_D_Levine(at)raytheon(dot)com
cc
pgsql-general(at)postgresql(dot)org
Subject
Re: [GENERAL] DNS vs /etc/hosts

On Thu, Aug 04, 2005 at 03:01:31PM -0500, Richard_D_Levine(at)raytheon(dot)com
wrote:
> I'd start by comparing the /etc/nsswitch.conf files on the various
> machines. If the second column contains "files" for passwd and hosts on
> the fast machines, and "dns" on the slow machine, then change the slow
> machine to "files" and see if it speeds up. That's an easy way to rule
out
> or condemn DNS.

The information we've been given suggests that the same version of
psql behaves the same on different machines, and that different
versions of psql behave differently on the same machine. If that's
the case, then such behavior isn't easily explained by differing
nsswitch.conf configurations. Even if mucking around with nsswitch.conf
did appear to fix things, we'd still have the mystery of why the two
versions of psql behave differently.

--
Michael Fuhr

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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Lowell.Hought 2005-08-04 21:39:28 Re: DNS vs /etc/hosts
Previous Message WELTY, RICHARD 2005-08-04 20:46:06 Re: DNS vs /etc/hosts