Re: Proposal: Implement failover on libpq connect level.

From: David Fetter <david(at)fetter(dot)org>
To: Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>
Cc: ''Victor Wagner *EXTERN*' *EXTERN*' <vitus(at)wagner(dot)pp(dot)ru>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Proposal: Implement failover on libpq connect level.
Date: 2015-08-19 15:40:41
Message-ID: 20150819154041.GA16249@fetter.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-jdbc

On Wed, Aug 19, 2015 at 07:15:30AM +0000, Laurenz Albe wrote:
> Victor Wagner wrote:
> >> I wonder how useful this is at the present time.
> >>
> Maybe a better idea would be:
> host=db1.myorg.com,db2.myorg.com port=5432,2345

I think if we're going to provide multiple sets of connection info, we
should just do that rather than trying to piece them together from
constituent parts, where the former looks like:

host="service=foo sslmode=require",postgresql://bar.baz/mydb?sslmode=require,"host=quux.corge user=grault port=6433"

As far as I can tell, the only way a comma could sneak into these
strings is if it were in a database name or similarly bizarre spot, in
which case the usual quoting needed to handle it in general should
handle it here.

It's not clear to me that libpq is the correct place to add this
feature, as we have fairly large user bases--the JDBC world, for
example--that don't use it.

Cheers,
David.
--
David Fetter <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
Skype: davidfetter XMPP: david(dot)fetter(at)gmail(dot)com

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2015-08-19 15:46:06 Re: Make HeapTupleSatisfiesMVCC more concurrent
Previous Message Andres Freund 2015-08-19 15:39:01 Re: Reduce ProcArrayLock contention

Browse pgsql-jdbc by date

  From Date Subject
Next Message Victor Wagner 2015-08-19 17:34:48 Re: Proposal: Implement failover on libpq connect level.
Previous Message Shulgin, Oleksandr 2015-08-19 15:25:07 Re: Proposal: Implement failover on libpq connect level.