Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 0C92419B0DDD for ; Thu, 17 May 2012 14:01:00 -0300 (ADT) Received: from auth-smtp.nebula.fi ([217.30.180.105]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SV44Q-0006am-Mg for pgsql-jdbc@postgresql.org; Thu, 17 May 2012 17:00:59 +0000 Received: from quadvadis.localdomain (gw.nitor.fi [83.145.228.24]) (authenticated bits=0) by auth-smtp.nebula.fi (8.13.8/8.13.4) with ESMTP id q4HH0hfb010155 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 17 May 2012 20:00:44 +0300 Message-ID: <4FB52EBB.4060309@nitorcreations.com> Date: Thu, 17 May 2012 20:00:43 +0300 From: Mikko Tiihonen User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120430 Thunderbird/12.0.1 MIME-Version: 1.0 To: pgsql-jdbc@postgresql.org Subject: Connection-fail-over Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.6 (--) X-Archive-Number: 201205/52 X-Sequence-Number: 22952 Hi, I have been thinking of adding connection fail-over support to the jdbc driver. What this means is that there would be a way to specify more than host:port pair to connect to. This will become handy with high-availability installations. Currently the limitation of hostname means that there has to be a virtual ip address that is moved with the active backend, which is a complex solution that can break. If we have list of hostname:port pairs we just have to make sure that only the master database allows connections from the jdbc clients. Before I implement this I would like to first ask opinions on how the connection url should look like. Current syntax is: jdbc:postgresql://hostname:port/database?options Which of these should we support: A) jdbc:postgresql://hostname1:port1,hostname2:port2/database?options B) jdbc:postgresql://hostname1,hostname2:port/database?options C) jdbc:postgresql://hostname1:port1/database?&failoverhost=hostname2:port2&options D) some other? -Mikko