Re: DNS vs /etc/hosts - Mailing list pgsql-general

From Michael Fuhr
Subject Re: DNS vs /etc/hosts
Date
Msg-id 20050804155805.GA88558@winnie.fuhr.org
Whole thread Raw
In response to DNS vs /etc/hosts  (Lowell.Hought@faa.gov)
List pgsql-general
On Thu, Aug 04, 2005 at 10:13:43AM -0500, Lowell.Hought@faa.gov wrote:
> I am changing from 7.2 to 8.0 and have both installed now on various Linux
> machines.  When I use the psql command line interface with a -h hostname,
> the connection time from 7.2 is instant while the connection time from 8.0
> is 15 seconds.  My assumption is that 7.2 checks the /etc/hosts file first
> and if unable to find the specified host it reverts to a DNS lookup, and
> the 8.0 is just the opposite.  Is this a correct assumption, and if so,
> can I modify 8.0 to behave as 7.2 does?

Have you determined whether the difference is in the client (psql),
in the server, or in both?  What happens if you use a 7.2 client
to connect to an 8.0 server, and if you use an 8.0 client to connect
to a 7.2 server?  Have you run a process trace or network sniffer
to test your hypothesis?  Let's find out exactly what and where the
problem is before looking for a solution.  But if DNS is the problem,
why not fix it instead of working around it?

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

pgsql-general by date:

Previous
From: Benjamin Scherrey
Date:
Subject: Default size limit for 'character varying' in Postgres 8?
Next
From: Scott Marlowe
Date:
Subject: Re: Default size limit for 'character varying' in