RE: Libpq support to connect to standby server as priority
От
Tsunakawa, Takayuki
Тема
RE: Libpq support to connect to standby server as priority
Дата
Msg-id
0A3221C70F24FB45833433255569204D1FB682DB@G01JPEXMBYT05
Ответ на
Список
Дерево обсуждения
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>
From: Dave Cramer [mailto:pg@fastcrypt.com]
> The original desire should have been the ability to connect to a
> primary or a standby. So, I think we should go back to the original thinking
> (and not complicate the feature), and create a read only GUC_REPORT variable,
> say, server_role, that identifies whether the server is a primary or a
> standby.
>
>
>
> I'm confused as to how this would work. Who or what determines if the server
> is a primary or standby?
Overall, the server determines the server role (primary or standby) using the same mechanism as pg_is_in_recovery(), and set the server_role GUC parameter. As the parameter is GUC_REPORT, the change is reported to the clients using the ParameterStatus ('S') message. The clients also get the value at connection.
Regards
Takayuki Tsunakawa
В списке pgsql-hackers по дате отправления
От: Mithun Cy
Дата: