Re: Proposal: Implement failover on libpq connect level. - Mailing list pgsql-hackers

From David Fetter
Subject Re: Proposal: Implement failover on libpq connect level.
Date
Msg-id 20150819154041.GA16249@fetter.org
Whole thread Raw
In response to Re: Proposal: Implement failover on libpq connect level.  (Albe Laurenz <laurenz.albe@wien.gv.at>)
List pgsql-hackers
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@fetter.org> http://fetter.org/
Phone: +1 415 235 3778  AIM: dfetter666  Yahoo!: dfetter
Skype: davidfetter      XMPP: david.fetter@gmail.com

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



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Reduce ProcArrayLock contention
Next
From: Simon Riggs
Date:
Subject: Re: Make HeapTupleSatisfiesMVCC more concurrent