From 8a123fb8e83c048680afccabcb8e384ac511eab0 Mon Sep 17 00:00:00 2001 From: Onder Kalaci Date: Wed, 1 Apr 2020 10:09:44 +0200 Subject: [PATCH] Add debug message, shorten sleep --- src/backend/distributed/connection/shared_connection_stats.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/backend/distributed/connection/shared_connection_stats.c b/src/backend/distributed/connection/shared_connection_stats.c index dfe197be3..c2628daf6 100644 --- a/src/backend/distributed/connection/shared_connection_stats.c +++ b/src/backend/distributed/connection/shared_connection_stats.c @@ -232,7 +232,7 @@ WaitOrErrorForSharedConnection(const char *hostname, int port) * Sleep this amount before retrying, there is not much value retrying too often * as the remote node is too busy. That's the reason we're retrying. */ - double sleepTimeoutMsec = 1000; + double sleepTimeoutMsec = 100; /* In practice, 0 disables the retry logic */ int allowedRetryCount = ConnectionRetryTimout / sleepTimeoutMsec; @@ -275,6 +275,9 @@ WaitOrErrorForSharedConnection(const char *hostname, int port) "citus.max_shared_pool_size or " "citus.connection_retry_timeout"))); } + + ereport(DEBUG4, (errmsg("connection to node %s:%d is retried for %d times", + hostname, port, retryCount))); } } }