-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve and fix connection timeout and total retry timeout.
Previously, when a connection timeout occurred with the default connection timeout set to pgconnect_timeout (10 seconds), there were no retries. This was because the total retry timeout (maxT) passed to `pgsql_set_retry_policy` in `pgsql_set_interactive_retry_policy` was also set to pgconnect_timeout, which had already elapsed during the initial connection attempt. To address this issue, the maxT value has been updated to POSTGRES_PING_RETRY_TIMEOUT. This change also means that maxT cannot be configured by altering PGCONNECT_TIMEOUT. If one wants to configure maxT they can change the values in defaults.h or we can make it configurable through some environment variable in future. After all this change `pgconnect_timeout` seems redundant so removed it.
- Loading branch information
1 parent
44d6fdf
commit e7c5382
Showing
6 changed files
with
27 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters