RE: Libpq support to connect to standby server as priority - Mailing list pgsql-hackers

From Tsunakawa, Takayuki
Subject RE: Libpq support to connect to standby server as priority
Date
Msg-id 0A3221C70F24FB45833433255569204D1FB683ED@G01JPEXMBYT05
Whole thread Raw
In response to Re: Libpq support to connect to standby server as priority  (Tatsuo Ishii <ishii@sraoss.co.jp>)
Responses Re: Libpq support to connect to standby server as priority
List pgsql-hackers
From: Tatsuo Ishii [mailto:ishii@sraoss.co.jp]
> But pg_is_in_recovery() returns true even for a promoting standby. So
> you have to wait and retry to send pg_is_in_recovery() until it
> finishes the promotion to find out it is now a primary. I am not sure
> if backend out to be responsible for this process. If not, libpq would
> need to handle it but I doubt it would be possible.

Yes, the application needs to retry connection attempts until success.  That's not different from PgJDBC and other
DBMSs.


Regards
Takayuki Tsunakawa





pgsql-hackers by date:

Previous
From: Tatsuo Ishii
Date:
Subject: Re: pgbench doc fix
Next
From: Etsuro Fujita
Date:
Subject: Re: Query with high planning time at version 11.1 compared versions10.5 and 11.0