Received: from maia.hub.org (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 543A2632D35 for ; Fri, 2 Apr 2010 04:48:40 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 26904-01 for ; Fri, 2 Apr 2010 07:48:21 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-ww0-f46.google.com (mail-ww0-f46.google.com [74.125.82.46]) by mail.postgresql.org (Postfix) with ESMTP id 03FC36338AA for ; Fri, 2 Apr 2010 04:48:24 -0300 (ADT) Received: by wwb17 with SMTP id 17so1255139wwb.19 for ; Fri, 02 Apr 2010 00:48:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:received:message-id :subject:from:to:content-type; bh=htRMvG0vuHxB/i26z3lu+BJ0r271kxsvDx1l0RZuDGs=; b=hG86UO+xgjU6UV0iR0Y92p/Jeqf610kDhWz9xkEHvqkSWZK1ae8X3q8tK05HUuP//c NQLMUDbgn/vtBlT1Z7maoCklpwgHaD10kWrmg/Jq9nmFUmxT6PwntTFWYRWjppeGswie U4BlVL7ywOSbXq1304LekGaYMij2frRJcOYB4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=AHlTL81blYLsrpudelrw+H/G9lop2/iMuUjBdIO6IBX4l4ipXseP4OistMYXK3CauK NGSJnQ1uWFRGmxIKvg/GAHfyycGSnDrLx/tZKJsdw6z3Ps+Zu3FHTD6FDQWnhr+WzKcc oJ1L0w/h84uTz+jZm+CSsGdGhX7VJT9qlxJBM= MIME-Version: 1.0 Received: by 10.216.185.19 with HTTP; Fri, 2 Apr 2010 00:48:23 -0700 (PDT) Date: Fri, 2 Apr 2010 09:48:23 +0200 Received: by 10.216.85.198 with SMTP id u48mr1025179wee.225.1270194503442; Fri, 02 Apr 2010 00:48:23 -0700 (PDT) Message-ID: Subject: dblink_connect is slow From: scheu dba To: pgsql-admin@postgresql.org Content-Type: multipart/alternative; boundary=0016e6d99b832c626104833c341b X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.598 tagged_above=-10 required=5 tests=BAYES_00=-2.599, HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 201004/47 X-Sequence-Number: 34141 --0016e6d99b832c626104833c341b Content-Type: text/plain; charset=ISO-8859-1 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 --0016e6d99b832c626104833c341b Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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=3Dremote_server=20 port=3D5432 dbname=3Dremote_bdd user=3Dremote_user password=3Dremote_pwd= 9;);

The problem is :
- when remote_server entry exists in /etc/h= osts 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 (usi= ng "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 exp= lain that a remote connexion is so long ?

Thank you by advance fore = your help

Jeff
--0016e6d99b832c626104833c341b--