BUG #1088: Name resolution connecting to a database

From: "PostgreSQL Bugs List" <pgsql-bugs(at)postgresql(dot)org>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #1088: Name resolution connecting to a database
Date: 2004-03-02 14:09:38
Message-ID: 20040302140938.307ADCF4B7D@www.postgresql.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


The following bug has been logged online:

Bug reference: 1088
Logged by: Antonino Albanese

Email address: al(dot)an(at)sitvallee(dot)it

PostgreSQL version: 7.4

Operating system: Linux server.sitvallee.it 2.4.20-28.7smp #1 SMP Thu Dec
18 11:18:31 EST 2003 i686 unknown

Description: Name resolution connecting to a database

Details:

I'm using postgresql 7.4.1 exactly the rpm version:
nino(at)server:~$ rpm -qva|grep -i postgresql
postgresql-docs-7.4.1-1PGDG
postgresql-devel-7.4.1-1PGDG
postgresql-contrib-7.4.1-1PGDG
postgresql-server-7.4.1-1PGDG
postgresql-libs-7.4.1-1PGDG
postgresql-7.4.1-1PGDG
postgresql-pl-7.4.1-1PGDG

on a 7.3 RH Server:
Linux server.sitvallee.it 2.4.20-28.7smp #1 SMP Thu Dec 18 11:18:31 EST 2003
i686 unknown

all the tests where done directly on the database
server, but I've got the same behavior from different
clients, either using psql or the php interface

trying to connect to the server with domain name
takes long time, here an example:
nino(at)server:~$ time psql -h server -d newtestdb -U download -c '\q'

real 0m10.151s
user 0m0.010s
sys 0m0.000s

but every thing works fine if I use the IP address:
nino(at)server:~$ time psql -h 192.168.0.1 -d newtestdb -U download -c '\q'

real 0m0.023s
user 0m0.000s
sys 0m0.020s

here the content of my configuration files:
------------------------------------
/var/lib/pgsql/data/pg_hba.conf
------------------------------------
local all all ident sameuser
host sitvallee download 192.168.0.0 255.255.255.0 trust
host newtestdb download 192.168.0.0 255.255.255.0 trust
host all all 127.0.0.1 255.255.255.255 md5
host all all 192.168.0.0 255.255.255.0 md5

------------------------------------
/var/lib/pgsql/data/postgresql.conf
------------------------------------
tcpip_socket = true
max_connections = 100
shared_buffers = 64000
sort_mem = 8192
effective_cache_size = 8000
datestyle = 'sql, european'
LC_MESSAGES = 'C'
LC_MONETARY = 'C'
LC_NUMERIC = 'C'
LC_TIME = 'C'

------------------------------------
/etc/host.conf
------------------------------------
order hosts,bind

------------------------------------
/etc/hosts
------------------------------------
127.0.0.1 localhost local # loopback
# Local Network.
192.168.0.13 capo.sitvallee.it capo
192.168.0.14 laptop.sitvallee.it laptop
192.168.0.10 devwin.sitvallee.it devwin
192.168.0.12 devgis.sitvallee.it devgis
192.168.0.11 devweb.sitvallee.it devweb
192.168.0.230 printer.sitvallee.it printer
192.168.0.1 server.sitvallee.it server
192.168.0.2 gateway.sitvallee.it gateway
192.168.0.5 switch.sitvallee.it switch

Hope I gave every needed information

Sincerely
Nino

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2004-03-02 15:05:56 Re: bug on index of tsearch2?
Previous Message 帅猛 2004-03-02 08:30:18 bug on index of tsearch2?