Re: Libpq support to connect to standby server as priority
От
Michael Paquier
Тема
Re: Libpq support to connect to standby server as priority
Дата
Msg-id
20181117001409.GB1182@paquier.xyz
Ответ на
Re: Libpq support to connect to standby server as priority (Haribabu Kommi)
Список
Дерево обсуждения
Libpq support to connect to standby server as priority Jing Wang <jingwangian@gmail.com>
RE: Libpq support to connect to standby server as priority "Tsunakawa, Takayuki" <tsunakawa.takay@jp.fujitsu.com>
Re: Libpq support to connect to standby server as priority Jing Wang <jingwangian@gmail.com>
Re: Libpq support to connect to standby server as priority Jing Wang <jingwangian@gmail.com>
On Sat, Nov 17, 2018 at 10:41:54AM +1100, Haribabu Kommi wrote: > Yes, we need either session open or reconnect it approach to find out > the whether server is read-write or read-only. Even if there is no agreement on this part, wouldn't a read-only option be enough to support any case? With a cluster of two nodes, one primary and one standby, a connection string listing both nodes would fail only in the middle of a planned failover. If you rinse and repeat it is possible to have a larger control at application level because you precisely know the whole state of the cluster at a given instant. > And also for read-only or prefer-read connection types, once after the > connection establishment is done, later server promotes to read-write, > I feel we can continue the connection, that decision makes the feature > simple, or do we want to stop the connection? That feels like something the application needs to care about once the session is established, but that's only my take on the matter. -- Michael
В списке pgsql-hackers по дате отправления
От: Andres Freund
Дата: