mirror of https://github.com/citusdata/citus.git
Log user in the failed connection message
parent
14ecebe47c
commit
0e287b1450
|
@ -246,6 +246,7 @@ ClearResultsIfReady(MultiConnection *connection)
|
|||
void
|
||||
ReportConnectionError(MultiConnection *connection, int elevel)
|
||||
{
|
||||
char *userName = connection->user;
|
||||
char *nodeName = connection->hostname;
|
||||
int nodePort = connection->port;
|
||||
PGconn *pgConn = connection->pgConn;
|
||||
|
@ -264,15 +265,15 @@ ReportConnectionError(MultiConnection *connection, int elevel)
|
|||
if (messageDetail)
|
||||
{
|
||||
ereport(elevel, (errcode(ERRCODE_CONNECTION_FAILURE),
|
||||
errmsg("connection to the remote node %s:%d failed with the "
|
||||
"following error: %s", nodeName, nodePort,
|
||||
errmsg("connection to the remote node %s@%s:%d failed with the "
|
||||
"following error: %s", userName, nodeName, nodePort,
|
||||
messageDetail)));
|
||||
}
|
||||
else
|
||||
{
|
||||
ereport(elevel, (errcode(ERRCODE_CONNECTION_FAILURE),
|
||||
errmsg("connection to the remote node %s:%d failed",
|
||||
nodeName, nodePort)));
|
||||
errmsg("connection to the remote node %s@%s:%d failed",
|
||||
userName, nodeName, nodePort)));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -128,7 +128,7 @@ BEGIN;
|
|||
(1 row)
|
||||
|
||||
SELECT count(*) FROM socket_test_table;
|
||||
ERROR: connection to the remote node localhost:xxxxx failed with the following error: connection not open
|
||||
ERROR: connection to the remote node postgres@localhost:xxxxx failed with the following error: connection not open
|
||||
ROLLBACK;
|
||||
-- repartition joins also can recover
|
||||
SET citus.enable_repartition_joins TO on;
|
||||
|
|
Loading…
Reference in New Issue