Re: Proposal: Implement failover on libpq connect level.

Поиск
Список
Период
Сортировка
От Victor Wagner
Тема Re: Proposal: Implement failover on libpq connect level.
Дата
Msg-id 20150908072932.72f4e974@wagner.wagner.home
обсуждение исходный текст
Ответ на Re: Proposal: Implement failover on libpq connect level.  ("Daniel Verite" <daniel@manitou-mail.org>)
Список pgsql-hackers
В Mon, 07 Sep 2015 17:32:48 +0200
"Daniel Verite" <daniel@manitou-mail.org> пишет:

>     Victor Wagner wrote:
>
> > It would just take a bit more time for client and a bit more load
> > for server - to make sure that this connection is read-write by
> > issuing
> >
> >    show transaction_read_only
> >
> > statement before considering connection useful.
>
> If the purpose of the feature is to wait for a failover to complete,
> shouldn't it check for pg_is_in_recovery() rather than
>  transaction_read_only ?
>

Purpose of this feature is to distinguish between master and standby
servers.

This allows failover system to work with standby servers accepting
client connections, and even to create system where read-only clients
can be loadbalanced among several hot backup servers, and read-write
clients work with master, but do not need reconfiguration when
failover happens.

pg_is_in_recovery() is really better. But it seems that chapter 25 of
documentation should be improved and this function mentioned in the
section 25.5.1 (Hot Standby / User Overview)



--                                   Victor Wagner <vitus@wagner.pp.ru>



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

Предыдущее
От: Peter Geoghegan
Дата:
Сообщение: Re: Should TIDs be typbyval = FLOAT8PASSBYVAL to speed up CREATE INDEX CONCURRENTLY?
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: On-demand running query plans using auto_explain and signals