X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 1AE9ADA81A for ; Thu, 22 Sep 2005 11:46:35 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 88830-06 for ; Thu, 22 Sep 2005 14:46:29 +0000 (GMT) Received: from mail.ecircle.de (mail.ecircle.de [195.140.186.200]) by svr1.postgresql.org (Postfix) with ESMTP id 78E93DA807 for ; Thu, 22 Sep 2005 11:46:29 -0300 (ADT) Received: from [192.168.1.110] (unknown [192.168.1.110]) by mail.ecircle.de (READY) with ESMTP id 7C8A8955226 for ; Thu, 22 Sep 2005 16:46:34 +0200 (CEST) Subject: [Fwd: Re: JDBC driver bug?] From: Csaba Nagy To: Postgres JDBC Content-Type: text/plain Message-Id: <1127400392.3026.231.camel@coppola.muc.ecircle.de> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 (1.4.6-2) Date: Thu, 22 Sep 2005 16:46:32 +0200 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.014 required=5 tests=[AWL=0.014] X-Spam-Level: X-Archive-Number: 200509/94 X-Sequence-Number: 13879 I'm forwarding this to the list too. It's best to hit "reply to all" when replying to mails to the postgres lists... -----Forwarded Message----- From: Csaba Nagy To: yoursoft@freemail.hu Subject: Re: [JDBC] JDBC driver bug? Date: Thu, 22 Sep 2005 16:42:30 +0200 OK, in this case you might have a problem of reverse DNS. Depending on how the JDBC driver is using the Java networking code it might happen that Java tries to look up the host name for the IP. In any case if there's different behavior when you run locally against when you run from another host on the network, it is quite obviously network related. Try to use the host name instead of the IP and make sure the IP can be resolved locally (on linux put it in /etc/hosts, on Windows in lmhosts I guess, but I didn't touch a windows for quite long time). HTH, Csaba. On Thu, 2005-09-22 at 16:23, yoursoft@freemail.hu wrote: > Dear Csaba, > > Thanks, for you fast answer. > I use the following format of the connection: con = > DriverManager.getConnection("jdbc:postgresql://10.1.1.1/dbname", "user", > "pwd"); > I think with the direct IP address not need to use the DNS server. It is > true? > > Regards, > Ferenc > > Csaba Nagy wrotte: > > >This kind of problems usually are caused by your network/networking code > >and not postgres itself. I bet there's some DNS resolution overhead and > >the different java versions you're using have different DNS > >resolution/caching policies. I would take a look at DNS as a first > >suspect. > > > >HTH, > >Csaba. > > > > > >On Thu, 2005-09-22 at 15:25, yoursoft@freemail.hu wrote: > > > > > >>Dear Developers, > >> > >>First, sorry my bad English. > >>My platform: > >>- postgresql 8.0.3 and 8.0.0 with SuSE Linux. > >>- java 1.5 update 4 (problem with it), java 1.4.2 (working without problem) > >>- jdbc 3 driver 312 (latest stable) > >> > >>I found the following problem: > >>If I connect to the database from local host with java 1.5, or with java > >>1.4.2 from other box everything is good (connection time <1 sec). > >>When I connect to the database on other box, there is slow connection > >>(5-6 sec). > >> > >>If you have any other question, please mail it. > >> > >>Regards, > >> Ferenc > >> > >>---------------------------(end of broadcast)--------------------------- > >>TIP 3: Have you checked our extensive FAQ? > >> > >> http://www.postgresql.org/docs/faq > >> > >> > > > > > >---------------------------(end of broadcast)--------------------------- > >TIP 2: Don't 'kill -9' the postmaster > > > > > > > > >