Re: Patch: Implement failover on libpq connect level.

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Patch: Implement failover on libpq connect level.
Дата
Msg-id CA+TgmoZuVNPGtFxvLcJX5gf52+vyf+Bfn6rd6fDN0x7jvEF0Ww@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Patch: Implement failover on libpq connect level.  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
On Tue, Nov 17, 2015 at 3:20 PM, Peter Eisentraut <peter_e@gmx.net> wrote:
> On 11/6/15 3:59 PM, Robert Haas wrote:
>> So, I really wonder why we're not happy with the ability to substitute
>> out just the host and IP.
>
> One of my concerns is that the proposed URLs are not valid URLs anymore
> that can be parsed or composed with a URL library, which would be sad.

I agree that's sad.  But compatibility with JDBC is happy, which is
something to think about, at least.

> The other issue is that I think it's taking the implementation down the
> wrong path.

Well, I don't object to the idea of having some kind of a function
that can take a set of connection strings or URLs and try them all.
But then it's not really a connection string any more.  I mean, with
the proposal where we allow the host option to be multiply specified,
you can just plug this feature into any utility whatever that
understands connection strings, and regardless of whether you are
using the classic connection string format or the URL format, it will
work.  And it's a pretty simple extension of what we support already.

psql 'host=foo host=bar failovertime=1'

If we do what you're proposing, then I'm really not clear on how this
works.  Certainly, there can be new libpq functions that take a list
of connection strings or URLs as an argument... but what would this
look like if you wanted to invoke psql this way?

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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Jeff Janes
Дата:
Сообщение: Re: Freeze avoidance of very large table.
Следующее
От: Stephen Frost
Дата:
Сообщение: Re: Additional role attributes && superuser review