From: | Gregory Youngblood <pgcluster(at)netio(dot)org> |
---|---|
To: | Lowell(dot)Hought(at)faa(dot)gov, PostgreSQL General <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: DNS vs /etc/hosts |
Date: | 2005-08-04 16:18:03 |
Message-ID: | EE9A7CA7-B5A7-450A-8658-F6CBDAE23884@netio.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Aug 4, 2005, at 8:13 AM, Lowell(dot)Hought(at)faa(dot)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?
Is this on the same machine, or have you changed machines when you
changed db versions?
(1) the lookups are usually handled by system calls, and assuming
your are on a Unix type system, the files /etc/host.conf and /etc/
nsswitch.conf will determine the order lookups are performed. Most
every system I have seen comes with a default configuration of using
the files first, and dns second. It might be useful to make sure
these are set correctly.
(2) have you checked the 8.0 pg_hba.conf? It looks like ident is
used. I am not very familiar with ident, usually only seeing it used
for IRC chats, but I believe it looks to your client for the ident
information. Are you running an ident server, or do you possibly have
a firewall that just drops packets for blocked ports (assuming ident
is among the blocked ports)? I would guess that a simple dropped
packet would make it time out, while a rejected or no server on port
would cause the ident connection to fail more quickly.
Just a couple of ideas.
Greg
From | Date | Subject | |
---|---|---|---|
Next Message | Adam O'Toole | 2005-08-04 16:30:12 | connection string - DNS |
Previous Message | Scott Marlowe | 2005-08-04 16:17:10 | Re: Default size limit for 'character varying' in |