"PostgreSQL Bugs List" <pgsql-bugs@postgresql.org> writes:
> trying to connect to the server with domain name
> takes long time, here an example:
> ...
> but every thing works fine if I use the IP address:
There's something wrong with your DNS setup. You'll probably find that
the same delay occurs with any program that tries to resolve a host name
(if in doubt, try "nslookup server").
I'd bet that your /etc/resolv.conf is pointing at a dead nameserver.
regards, tom lane