Re: DNS vs /etc/hosts

From: Lowell(dot)Hought(at)faa(dot)gov
To: Tino Wildenhain <tino(at)wildenhain(dot)de>
Cc: pgsql-general(at)postgresql(dot)org, pgsql-general-owner(at)postgresql(dot)org
Subject: Re: DNS vs /etc/hosts
Date: 2005-08-04 17:04:27
Message-ID: OF525AB70A.A842E801-ON86257053.005953A3-86257053.005DB05B@faa.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Machine 1 is running version 8.0
Machine 2 is running version 7.2
Machine 3 has version 7.2 and version 8.0 installed, so both versions of
"psql" are available for testing.

From machine 3 to machine 2
Version 7.2 psql - /usr/bin/psql -d dbname -h machine2 ---- connection
time instant
Version 8.0 psql - /usr/local/pgsql/bin/psql -d dbname -h machine2 ----
conection time 15 seconds
Version 8.0 psql - /usr/local/pgsql/bin/psql -d dbname -h ip.address ----
connection time instant

From machine 3 to machine 1
Version 7.2 psql - /usr/bin/psql -d dbname -h machine1 ----
connection time instant
Version 8.0 psql - /usr/local/pgsql/bin/psql -d dbname -h machine1 ----
conection time 15 seconds
Version 8.0 psql - /usr/local/pgsql/bin/psql -d dbname -h ip.address ----
connection time instant

Tino Wildenhain <tino(at)wildenhain(dot)de>
Sent by: pgsql-general-owner(at)postgresql(dot)org
08/04/2005 10:56 AM

To
Lowell Hought/AGL/FAA(at)FAA
cc
pgsql-general(at)postgresql(dot)org
Subject
Re: [GENERAL] DNS vs /etc/hosts

Am Donnerstag, den 04.08.2005, 10:13 -0500 schrieb
Lowell(dot)Hought(at)faa(dot)gov:
>
> 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?

No, applications dont do lookups theirself.
The os (or rather the resolver lib) decides
how it works and therefore both 7.2 and 8.0
will behave the same.

I think you have different user policies in their
pg_hba.conf and 8.0 might (per default) want to
check ident. And if you firewall it or so it might
take a while to timeout.

--
Tino Wildenhain <tino(at)wildenhain(dot)de>

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Andrew Stewart 2005-08-04 18:26:54 psqsl -> remote db
Previous Message DracKewl 2005-08-04 16:56:03 Re: Cursor Issue??