From: Tatsuo Ishii [mailto:is...@sraoss.co.jp]
> I don't know what PgJDBC is doing, however I think libpq needs to do
> more than just retrying.
> 
> 1) Try to find a node on which pg_is_in_recovery() returns false. If
>    found, then we assume that is the primary. We also assume that
>    other nodes are standbys. done.
> 
> 2) If there's no node on which pg_is_in_recovery() returns false, then
>    we need to retry until we find it. To not retry forever, there
>    should be a timeout counter parameter.

It may be convenient for libpq to be able to retry connection attempts for a 
specified duration (by failover_timeout or such), because it eliminates the 
need for the application to do the retry.  But I think it's a desirable 
feature, not a required one.


Regards
Takayuki Tsunakawa



Reply via email to