Always set "connect_timeout" when pinging a PostgreSQL instance

Insert "connect_timeout=2" into the connection parameters, if not
explicitly set by the user. This will prevent excessive wait time
for the host operating system to report a connection timeout.
This commit is contained in:
Ian Barwick
2018-03-21 10:33:05 +09:00
committed by Ian Barwick
parent ae655eb4fd
commit 94d26dbe9f
4 changed files with 44 additions and 3 deletions

View File

@@ -466,6 +466,7 @@ int wait_connection_availability(PGconn *conn, long long timeout);
/* node availability functions */
bool is_server_available(const char *conninfo);
bool is_server_available_params(t_conninfo_param_list *param_list);
/* monitoring functions */
void