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
|
void
|
||||||
ReportConnectionError(MultiConnection *connection, int elevel)
|
ReportConnectionError(MultiConnection *connection, int elevel)
|
||||||
{
|
{
|
||||||
|
char *userName = connection->user;
|
||||||
char *nodeName = connection->hostname;
|
char *nodeName = connection->hostname;
|
||||||
int nodePort = connection->port;
|
int nodePort = connection->port;
|
||||||
PGconn *pgConn = connection->pgConn;
|
PGconn *pgConn = connection->pgConn;
|
||||||
|
@ -264,15 +265,15 @@ ReportConnectionError(MultiConnection *connection, int elevel)
|
||||||
if (messageDetail)
|
if (messageDetail)
|
||||||
{
|
{
|
||||||
ereport(elevel, (errcode(ERRCODE_CONNECTION_FAILURE),
|
ereport(elevel, (errcode(ERRCODE_CONNECTION_FAILURE),
|
||||||
errmsg("connection to the remote node %s:%d failed with the "
|
errmsg("connection to the remote node %s@%s:%d failed with the "
|
||||||
"following error: %s", nodeName, nodePort,
|
"following error: %s", userName, nodeName, nodePort,
|
||||||
messageDetail)));
|
messageDetail)));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ereport(elevel, (errcode(ERRCODE_CONNECTION_FAILURE),
|
ereport(elevel, (errcode(ERRCODE_CONNECTION_FAILURE),
|
||||||
errmsg("connection to the remote node %s:%d failed",
|
errmsg("connection to the remote node %s@%s:%d failed",
|
||||||
nodeName, nodePort)));
|
userName, nodeName, nodePort)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -128,7 +128,7 @@ BEGIN;
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT count(*) FROM socket_test_table;
|
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;
|
ROLLBACK;
|
||||||
-- repartition joins also can recover
|
-- repartition joins also can recover
|
||||||
SET citus.enable_repartition_joins TO on;
|
SET citus.enable_repartition_joins TO on;
|
||||||
|
|
Loading…
Reference in New Issue