Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1V1WAn-0000Sb-9O for pgsql-jdbc@arkaria.postgresql.org; Tue, 23 Jul 2013 06:34:13 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1V1WAm-0007lT-Lt for pgsql-jdbc@arkaria.postgresql.org; Tue, 23 Jul 2013 06:34:12 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1V1WAl-0007lM-Lv for pgsql-jdbc@postgresql.org; Tue, 23 Jul 2013 06:34:11 +0000 Received: from [222.73.24.84] (helo=song.cn.fujitsu.com) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1V1WAe-000565-Hx for pgsql-jdbc@postgresql.org; Tue, 23 Jul 2013 06:34:10 +0000 X-IronPort-AV: E=Sophos;i="4.89,725,1367942400"; d="scan'208";a="7988332" Received: from unknown (HELO tang.cn.fujitsu.com) ([10.167.250.3]) by song.cn.fujitsu.com with ESMTP; 23 Jul 2013 14:31:00 +0800 Received: from fnstmail02.fnst.cn.fujitsu.com (tang.cn.fujitsu.com [127.0.0.1]) by tang.cn.fujitsu.com (8.14.3/8.13.1) with ESMTP id r6N6XTIJ009409; Tue, 23 Jul 2013 14:33:59 +0800 Received: from [127.0.0.1] ([10.167.224.93]) by fnstmail02.fnst.cn.fujitsu.com (Lotus Domino Release 8.5.3) with ESMTP id 2013072314212093-43601 ; Tue, 23 Jul 2013 14:21:20 +0800 Message-ID: <51EE2159.8000109@cn.fujitsu.com> Date: Tue, 23 Jul 2013 14:23:21 +0800 From: Chen Huajun User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; ja; rv:1.9.2.28) Gecko/20120306 Lightning/1.0b2 Thunderbird/3.1.20 MIME-Version: 1.0 To: Mistina Michal CC: "pgsql-jdbc@postgresql.org" Subject: Re: Fail-over PG server in connection string - syntax ? References: <4da286cd15324df59679fa18960e58d3@Electra.virte.intra> In-Reply-To: <4da286cd15324df59679fa18960e58d3@Electra.virte.intra> X-MIMETrack: Itemize by SMTP Server on mailserver/fnst(Release 8.5.3|September 15, 2011) at 2013/07/23 14:21:21, Serialize by Router on mailserver/fnst(Release 8.5.3|September 15, 2011) at 2013/07/23 14:32:00, Serialize complete at 2013/07/23 14:32:00 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=ISO-8859-1; format=flowed X-Host-Lookup-Failed: Reverse DNS lookup failed for 222.73.24.84 (failed) X-Pg-Spam-Score: 0.1 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-jdbc Precedence: bulk Sender: pgsql-jdbc-owner@postgresql.org hi Michal, >What is the correct syntax for building connection string? Should the fail-over within postgres-jdbc driver work? The correct syntax is as the following jdbc:postgresql://host1:port1,host2:port2/test > String connectionString = "jdbc:postgresql://pgsqldc1:5432/test,pgsqldc2:5432/test"; In the above sample,the correct connection string should looks like that String connectionString = "jdbc:postgresql://pgsqldc1:5432,pgsqldc2:5432/test"; Best regards, Chen Huajun -- Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-jdbc