Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 397FB4E4EE3 for ; Sat, 26 May 2012 09:27:32 -0300 (ADT) Received: from auth-smtp.nebula.fi ([217.30.180.105]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SYG5g-0000ur-Db for pgsql-jdbc@postgresql.org; Sat, 26 May 2012 12:27:31 +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 q4QCR9FK023233 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sat, 26 May 2012 15:27:15 +0300 Message-ID: <4FC0CC1D.1000603@nitorcreations.com> Date: Sat, 26 May 2012 15:27:09 +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: Simple connection fail-over documentation patch References: <4FBB9691.50008@nitorcreations.com> In-Reply-To: <4FBB9691.50008@nitorcreations.com> Content-Type: multipart/mixed; boundary="------------060800010500010006060403" X-Pg-Spam-Score: -2.6 (--) X-Archive-Number: 201205/79 X-Sequence-Number: 22979 This is a multi-part message in MIME format. --------------060800010500010006060403 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Here is a patch that updates the documentation to show include information about the connection fail-over url syntax and functionality. --------------060800010500010006060403 Content-Type: text/x-patch; name="connection-failover-documentation.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="connection-failover-documentation.patch" diff --git a/doc/pgjdbc.xml b/doc/pgjdbc.xml index a13d320..10d7e5f 100644 --- a/doc/pgjdbc.xml +++ b/doc/pgjdbc.xml @@ -812,6 +812,31 @@ openssl pkcs8 -topk8 -in client.key -out client.pk8 -outform DER -v1 PBE-SHA1-3D + + Connection Fail-over + + + To support simple connection fail-over it is possible to define multiple + endpoints (host and port pairs) in the connection url separated by commas. + The driver will try to once connect to each of them in order until the + connection succeeds. If none succeed, a normal connection exception is + thrown. + + + The syntax for the connection url is: + +jdbc:postgresql://host1:port1,host2:port2/database + + + + + The simple connection fail-over is useful when running against + a high availability postgres installation that has identical data on each node. + For example streaming replication postgres that only accepts connection on the master + node or postgres-xc cluster. + + + --------------060800010500010006060403--