diff options
author | Tomas Vondra | 2017-01-19 07:56:07 +0000 |
---|---|---|
committer | Tomas Vondra | 2017-01-19 07:58:48 +0000 |
commit | 96bb1865835168112b01a4d656b222ab4b2b9494 (patch) | |
tree | 85567078aaf858bcea63b9f987017b56abcbc24c | |
parent | 8307da2369f0ac59867ea42eaf1670bddaea8d5a (diff) |
add name of the originating node to application_name
Until now the application_name was set to 'pgxc' for all connections.
Set it to 'pgxc:NODE_NAME' instead, to make it easier to understand
data from pg_stat_activity.
-rw-r--r-- | src/backend/pgxc/pool/pgxcnode.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/pgxc/pool/pgxcnode.c b/src/backend/pgxc/pool/pgxcnode.c index cc5df6963e..28a5bbb4c6 100644 --- a/src/backend/pgxc/pool/pgxcnode.c +++ b/src/backend/pgxc/pool/pgxcnode.c @@ -278,8 +278,8 @@ PGXCNodeConnStr(char *host, int port, char *dbname, * remote type can be Coordinator, Datanode or application. */ num = snprintf(connstr, sizeof(connstr), - "host=%s port=%d dbname=%s user=%s application_name=pgxc sslmode=disable options='-c remotetype=%s -c parentnode=%s %s'", - host, port, dbname, user, remote_type, parent_node, + "host=%s port=%d dbname=%s user=%s application_name='pgxc:%s' sslmode=disable options='-c remotetype=%s -c parentnode=%s %s'", + host, port, dbname, user, parent_node, remote_type, parent_node, pgoptions); /* Check for overflow */ |