Re: Patch: Implement failover on libpq connect level.
От | Tsunakawa, Takayuki |
---|---|
Тема | Re: Patch: Implement failover on libpq connect level. |
Дата | |
Msg-id | 0A3221C70F24FB45833433255569204D1F63DB26@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 |
From: pgsql-hackers-owner@postgresql.org > [mailto:pgsql-hackers-owner@postgresql.org] On Behalf Of Mithun Cy > Among the remaining things I have worked on failover to new master idea. > Below patch implement that idea. This is taken from Victors patch but > rewritten by me to do some cleanup. As in Victor's patch we have a new > connection parameter "target_server_type", It can take 2 values 1. "any" > 2. "master" with DEFAULT as "any". If it's has the value "any" we can connect > to any of the host server (both master(primary) and slave(standby)). If > the value is "master" then we try to connect to master(primary) only. > NOTE: Parameter name is inspired and taken from PostgreSql JDBC Driver > <https://jdbc.postgresql.org/documentation/head/connect.html> . I'm interested to review this patch (but I haven't read it yet, I'm reading Robert's patch now.) Are you planning a newCommitFest entry? Why don't you add "standby" and "prefer_standby" as the target_server_type value? Are you thinking that those values areuseful with load balancing feature? > The main difference between Victor's and this new patch is Default value > of parameter target_server_type. In Victor's patch if number of host in > connection string is 1 then default value is "any" (This was done to make > sure old psql connect to standby as it is now). If it is greater than 1 > then default value is set as "master". For me this appeared slightly > inconsistent having default value as "any" for any number of connection > appeared more appropriate which is also backward compatible. And, if user > want failover to master he should ask for it by setting > target_server_type=master in connection string. That's sensible, I agree. Regards Takayuki Tsunakawa
В списке pgsql-hackers по дате отправления: