omission in ODBC documentation ... ?

Peter Humaj <[email protected]> Fri, 23 Aug 2019 07:26:58 +0200
Newsgroups gmane.comp.db.postgresql.odbc
Message-ID <[email protected]>
This is a multi-part message in MIME format.
--------------6512A3CD419DA50E0F3044E9
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit

Hi,

I have a PostgreSQL server connected to 2 redundant network segments.

Therefore I needed to specify 2 IP addresses in ODBC configuration of a 
client which is also connected to these 2 networks.

I found this: 
https://www.enterprisedb.com/blog/improve-database-resiliency-new-jdbc-connectors-and-edb-failover-manager 


saying that jdbc supports this feature, syntax is: 
jdbc:postgresql://host1:port1,host2:port2/database

However, I found no such information for ODBC driver.

I tried anyway to configure multiple addresses .. and it works. If you 
specify "Server" (in Windows ODBC) or "Servername" (in Linux 
/etc/odbc.ini or in windows registry configuration of ODBC) as 
"server1[,server2[,server3...]] then it works (driver tries to connect 
first to server1, then to server2 etc .. so the connection may take some 
time, but it is established successfully even if e.g. server1 is down). 
In windows, whitespaces are not permitted in the string.

So it seems that this is undocumented (or I'm not able to find this info 
anywhere).

In your release notes (https://odbc.postgresql.org/docs/release.html) 
there is however one interesting line. In section "psqlODBC 08.02.0101" 
there is

4) Handle multi-addresses of a specified host properly.

which suggests that this feature is in ODBC drive quite long. Of course, 
this can be used also for configuring access to multiple redundant 
PostgreSQL servers.

Can you please add this to documentation/FAQ? Might be interesting for 
people as PostgreSQL is being used also in environments requiring high 
availability, redundancy etc (e.g. we use it in SCADA solutions)

best regards

peter


--------------6512A3CD419DA50E0F3044E9
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 8bit

<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Hi,</p>
    <p>I have a PostgreSQL server connected to 2 redundant network
      segments.</p>
    <p>Therefore I needed to specify 2 IP addresses in ODBC
      configuration of a client which is also connected to these 2
      networks.</p>
    <p>I found this:
<a class="moz-txt-link-freetext" href="https://www.enterprisedb.com/blog/improve-database-resiliency-new-jdbc-connectors-and-edb-failover-manager">https://www.enterprisedb.com/blog/improve-database-resiliency-new-jdbc-connectors-and-edb-failover-manager</a>
      <br>
    </p>
    <p>saying that jdbc supports this feature, syntax is:   
      jdbc:postgresql://host1:port1,host2:port2/database</p>
    <p>However, I found no such information for ODBC driver.</p>
    <p>I tried anyway to configure multiple addresses .. and it works.
      If you specify "Server" (in Windows ODBC) or "Servername" (in
      Linux /etc/odbc.ini or in windows registry configuration of ODBC)
      as "server1[,server2[,server3...]] then it works (driver tries to
      connect first to server1, then to server2 etc .. so the connection
      may take some time, but it is established successfully even if
      e.g. server1 is down). In windows, whitespaces are not permitted
      in the string.</p>
    <p>So it seems that this is undocumented (or I'm not able to find
      this info anywhere).</p>
    <p>In your release notes (<a
        href="https://odbc.postgresql.org/docs/release.html">https://odbc.postgresql.org/docs/release.html</a>)
      there is however one interesting line. In section "psqlODBC
      08.02.0101" there is <br>
    </p>
    <p><span style="color: rgb(0, 0, 0); font-family: &quot;Times New
        Roman&quot;; font-size: medium; font-style: normal;
        font-variant-ligatures: normal; font-variant-caps: normal;
        font-weight: 400; letter-spacing: normal; orphans: 2;
        text-align: start; text-indent: 0px; text-transform: none;
        white-space: normal; widows: 2; word-spacing: 0px;
        -webkit-text-stroke-width: 0px; background-color: rgb(255, 255,
        255); text-decoration-style: initial; text-decoration-color:
        initial; display: inline !important; float: none;">4) Handle
        multi-addresses of a specified host properly.</span></p>
    <p><span style="color: rgb(0, 0, 0); font-family: &quot;Times New
        Roman&quot;; font-size: medium; font-style: normal;
        font-variant-ligatures: normal; font-variant-caps: normal;
        font-weight: 400; letter-spacing: normal; orphans: 2;
        text-align: start; text-indent: 0px; text-transform: none;
        white-space: normal; widows: 2; word-spacing: 0px;
        -webkit-text-stroke-width: 0px; background-color: rgb(255, 255,
        255); text-decoration-style: initial; text-decoration-color:
        initial; display: inline !important; float: none;">which
        suggests that this feature is in ODBC drive quite long. Of
        course, this can be used also for configuring access to multiple
        redundant PostgreSQL servers.</span></p>
    <p><span style="color: rgb(0, 0, 0); font-family: &quot;Times New
        Roman&quot;; font-size: medium; font-style: normal;
        font-variant-ligatures: normal; font-variant-caps: normal;
        font-weight: 400; letter-spacing: normal; orphans: 2;
        text-align: start; text-indent: 0px; text-transform: none;
        white-space: normal; widows: 2; word-spacing: 0px;
        -webkit-text-stroke-width: 0px; background-color: rgb(255, 255,
        255); text-decoration-style: initial; text-decoration-color:
        initial; display: inline !important; float: none;">Can you
        please add this to documentation/FAQ? Might be interesting for
        people as PostgreSQL is being used also in environments
        requiring high availability, redundancy etc (e.g. we use it in
        SCADA solutions)<br>
      </span></p>
    <p><span style="color: rgb(0, 0, 0); font-family: &quot;Times New
        Roman&quot;; font-size: medium; font-style: normal;
        font-variant-ligatures: normal; font-variant-caps: normal;
        font-weight: 400; letter-spacing: normal; orphans: 2;
        text-align: start; text-indent: 0px; text-transform: none;
        white-space: normal; widows: 2; word-spacing: 0px;
        -webkit-text-stroke-width: 0px; background-color: rgb(255, 255,
        255); text-decoration-style: initial; text-decoration-color:
        initial; display: inline !important; float: none;">best regards</span></p>
    <p><span style="color: rgb(0, 0, 0); font-family: &quot;Times New
        Roman&quot;; font-size: medium; font-style: normal;
        font-variant-ligatures: normal; font-variant-caps: normal;
        font-weight: 400; letter-spacing: normal; orphans: 2;
        text-align: start; text-indent: 0px; text-transform: none;
        white-space: normal; widows: 2; word-spacing: 0px;
        -webkit-text-stroke-width: 0px; background-color: rgb(255, 255,
        255); text-decoration-style: initial; text-decoration-color:
        initial; display: inline !important; float: none;">peter<br>
      </span></p>
  </body>
</html>

--------------6512A3CD419DA50E0F3044E9--