pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
omission in ODBC documentation ... ?
2+ messages / 2 participants
[nested] [flat]

* omission in ODBC documentation ... ?
@ 2019-08-23 05:26 Peter Humaj <peter@humaj.sk>
  2019-08-23 08:54 ` Re: omission in ODBC documentation ... ? Clemens Ladisch <clemens@ladisch.de>
  0 siblings, 1 reply; 2+ messages in thread

From: Peter Humaj @ 2019-08-23 05:26 UTC (permalink / raw)
  To: pgsql-odbc

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-m... 


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

^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: omission in ODBC documentation ... ?
  2019-08-23 05:26 omission in ODBC documentation ... ? Peter Humaj <peter@humaj.sk>
@ 2019-08-23 08:54 ` Clemens Ladisch <clemens@ladisch.de>
  0 siblings, 0 replies; 2+ messages in thread

From: Clemens Ladisch @ 2019-08-23 08:54 UTC (permalink / raw)
  To: pgsql-odbc@lists.postgresql.org

Peter Humaj wrote:
> I needed to specify 2 IP addresses in ODBC configuration of a client
> which is also connected to these 2 networks.
>
> 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
>
> So it seems that this is undocumented (or I'm not able to find this
> info anywhere).

psqlODBC uses libpq:
<https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-MULTIPLE-HOSTS;

> Can you please add this to documentation/FAQ?

It might be helpful to add a link to the connection string documentation:
<https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING;


Regards,
Clemens





^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2019-08-23 08:54 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-08-23 05:26 omission in ODBC documentation ... ? Peter Humaj <peter@humaj.sk>
2019-08-23 08:54 ` Clemens Ladisch <clemens@ladisch.de>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox