Re: [PATCH] libpq: Allow specifying multiple host names to try to connect to

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Mikko Tiihonen <Mikko(dot)Tiihonen(at)nitorcreations(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] libpq: Allow specifying multiple host names to try to connect to
Date: 2015-04-29 21:59:41
Message-ID: CA+TgmoajV=YmWNNbwWm0C6mmXyXD=BEAbEQjw5N94rzT+R2crg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Apr 19, 2015 at 11:18 AM, Mikko Tiihonen
<Mikko(dot)Tiihonen(at)nitorcreations(dot)com> wrote:
> I would like allow specifying multiple host names for libpq to try to
> connecting to. This is currently only supported if the host name resolves to
> multiple addresses. Having the support for it without complex dns setup
> would be much easier.
>
> Example:
>
> psql -h dbslave,dbmaster -p 5432 dbname
>
> psql 'postgresql://dbslave,dbmaster:5432/dbname'
>
>
> Here the idea is that without any added complexity of pgbouncer or similar
> tool I can get any libpq client to try connecting to multiple nodes until
> one answers. I have added the similar functionality to the jdbc driver few
> years ago.

I'm not sure if this exact idea is what we want to do, but I like the
concept, and I think a lot of users would find it handy.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2015-04-29 22:02:39 Re: INSERT ... ON CONFLICT syntax issues
Previous Message Robert Haas 2015-04-29 21:55:51 Re: patch for xidin