pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
dblink_connect is slow
2+ messages / 2 participants
[nested] [flat]

* dblink_connect is slow
@ 2010-04-02 07:48  scheu dba <scheu.postgresql@gmail.com>
  0 siblings, 1 reply; 2+ messages in thread

From: scheu dba @ 2010-04-02 07:48 UTC (permalink / raw)
  To: pgsql-admin

Hi

Using Postgresql 8.2 on Linux, I am trying to use dblink contrib to connect
to a remote Postresql 8.2 database. I am using the following SQL :

select dblink_connect('host=remote_server port=5432 dbname=remote_bdd
user=remote_user password=remote_pwd');

The problem is :
- when remote_server entry exists in /etc/hosts file, the connexionis
immediate
- but when remote_server entry does not exists in /etc/hosts file, the
connexion take 1 minute

However, even if remote_server entry does not exists in /etc/hosts file, I
can ping immediately the remote_server and a remote psql connexion (using
"psql -h remote_server -d remote_bdd") is also immediate, so I don't think
that my network or DNS server could be the problem

Is the something particular with dblink_connect function that could explain
that a remote connexion is so long ?

Thank you by advance fore your help

Jeff

^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: dblink_connect is slow
@ 2010-04-06 20:59  Kevin Grittner <Kevin.Grittner@wicourts.gov>
  parent: scheu dba <scheu.postgresql@gmail.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Kevin Grittner @ 2010-04-06 20:59 UTC (permalink / raw)
  To: scheu dba <scheu.postgresql@gmail.com>; pgsql-admin

scheu dba <scheu.postgresql@gmail.com> wrote:
 
> - when remote_server entry exists in /etc/hosts file, the
> connexionis immediate
> - but when remote_server entry does not exists in /etc/hosts file,
> the connexion take 1 minute
 
You might want to check that the server has a reverse DNS entry (to
map the IP address back to a server name).
 
-Kevin



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2010-04-06 20:59 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2010-04-02 07:48 dblink_connect is slow scheu dba <scheu.postgresql@gmail.com>
2010-04-06 20:59 ` Kevin Grittner <Kevin.Grittner@wicourts.gov>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox