From: Pavan Deolasee Date: Mon, 23 May 2016 10:05:11 +0000 (+0530) Subject: Log more information about connection error for ease in debugging X-Git-Tag: XL9_5_R1_2~49 X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=fec0f2ac6be7d02ff00585ea7faea0d7fbaa048a;p=postgres-xl.git Log more information about connection error for ease in debugging --- diff --git a/src/backend/pgxc/pool/poolmgr.c b/src/backend/pgxc/pool/poolmgr.c index e3ed53ce4b..6293e31ee4 100644 --- a/src/backend/pgxc/pool/poolmgr.c +++ b/src/backend/pgxc/pool/poolmgr.c @@ -2382,10 +2382,13 @@ grow_pool(DatabasePool *dbPool, Oid node) slot->conn = PGXCNodeConnect(nodePool->connstr); if (!PGXCNodeConnected(slot->conn)) { - destroy_slot(slot); ereport(LOG, (errcode(ERRCODE_CONNECTION_FAILURE), - errmsg("failed to connect to Datanode"))); + errmsg("failed to connect to node, connection string (%s)," + " connection error (%s)", + nodePool->connstr, + PQerrorMessage(slot->conn)))); + destroy_slot(slot); /* * If we failed to connect probably number of connections on the * target node reached max_connections. Try and release idle