Re: Proposal: Implement failover on libpq connect level.

Поиск
Список
Период
Сортировка
От Albe Laurenz
Тема Re: Proposal: Implement failover on libpq connect level.
Дата
Msg-id A737B7A37273E048B164557ADEF4A58B50F92F7C@ntex2010i.host.magwien.gv.at
обсуждение исходный текст
Ответ на Proposal: Implement failover on libpq connect level.  (Victor Wagner <vitus@wagner.pp.ru>)
Ответы Re: Proposal: Implement failover on libpq connect level.  (PostgreSQL - Hans-Jürgen Schönig<postgres@cybertec.at>)
Re: Proposal: Implement failover on libpq connect level.  ('Victor Wagner *EXTERN*' <vitus@wagner.pp.ru>)
Список pgsql-hackers
Victor Wagner wrote:
> Rationale
> =========
> 
> Since introduction of the WAL-based replication into the PostgreSQL, it is
> possible to create high-availability and load-balancing clusters.
> 
> However, there is no support for failover in the client libraries. So, only
> way to provide transparent for client application failover is IP address
> migration. This approach has some limitation, i.e. it requires that
> master and backup servers reside in the same subnet or may not be
> feasible for other reasons.
> 
> Commercial RDBMS, such as Oracle, employ more flexible approach. They
> allow to specify multiple servers in the connect string, so if primary
> server is not available, client library tries to connect to other ones.
> 
> This approach allows to use geographically distributed failover clusters
> and also is a cheap way to implement load-balancing (which is not
> possible with IP address migration).

I wonder how useful this is at the present time.

If the primary goes down and the client gets connected to the standby,
it would have read-only access there.  Most applications wouldn't cope
well with that.

Once we have multi-master replication that can be used for fail-over,
the picture will change.  Then a feature like that would be very useful indeed.

>     "host=main-server host=standby1 host=standby2 port=5432 dbname=database"

It seems a bit arbitrary to require that all servers use the same port.

Maybe parameters like host2, port2, host3, port3 etc. might be better.

Yours,
Laurenz Albe

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

Предыдущее
От: Oleg Bartunov
Дата:
Сообщение: Re: jsonb array-style subscripting
Следующее
От: Kouhei Kaigai
Дата:
Сообщение: Re: [Proposal] Table partition + join pushdown