Re: Patch: Implement failover on libpq connect level.

Поиск
Список
Период
Сортировка
От Tsunakawa, Takayuki
Тема Re: Patch: Implement failover on libpq connect level.
Дата
Msg-id 0A3221C70F24FB45833433255569204D1F63FD30@G01JPEXMBYT05
обсуждение исходный текст
Ответ на Re: Patch: Implement failover on libpq connect level.  (Mithun Cy <mithun.cy@enterprisedb.com>)
Ответы Re: Patch: Implement failover on libpq connect level.
Список pgsql-hackers
Hi, Mithun

Before going deeper into the patch, let me give you some findings.

(1)
PGconn->target_server_type is not freed in freePGconn().


(2)
Could you add PGTARGETSERVERTYPE environment variable?  Like other variables, it will ease testing, since users can
changethe behavior without altering the connection string here and there.
 


(3)
I think it would be better to expose the server state via ParameterStatus protocol message like
standard_conforming_strings,instead of running "SELECT pg_is_in_recovery()".  We shouldn't want to add one round trip
tocheck the server type (master, standby).  postmaster can return the server type based on its state (pmState); PM_RUN
ismaster, and PM_HOT_STANDBY is standby.  In addition, as an impractical concern, DBA can revoke EXECUTE privilege on
pg_is_in_recovery()from non-superusers.
 

Regards
Takayuki Tsunakawa


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

Предыдущее
От: Amit Langote
Дата:
Сообщение: Re: Declarative partitioning - another take
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: Fix checkpoint skip logic on idle systems by tracking LSN progress