Commit 48075095 authored by Magnus Hagander's avatar Magnus Hagander

Set fallback_application_name in walreceiver

Makes replication slaves identify themselves in the new
pg_stat_replication view.
parent 34ef02b4
...@@ -78,7 +78,7 @@ _PG_init(void) ...@@ -78,7 +78,7 @@ _PG_init(void)
static bool static bool
libpqrcv_connect(char *conninfo, XLogRecPtr startpoint) libpqrcv_connect(char *conninfo, XLogRecPtr startpoint)
{ {
char conninfo_repl[MAXCONNINFO + 37]; char conninfo_repl[MAXCONNINFO + 75];
char *primary_sysid; char *primary_sysid;
char standby_sysid[32]; char standby_sysid[32];
TimeLineID primary_tli; TimeLineID primary_tli;
...@@ -92,7 +92,7 @@ libpqrcv_connect(char *conninfo, XLogRecPtr startpoint) ...@@ -92,7 +92,7 @@ libpqrcv_connect(char *conninfo, XLogRecPtr startpoint)
* "replication" for .pgpass lookup. * "replication" for .pgpass lookup.
*/ */
snprintf(conninfo_repl, sizeof(conninfo_repl), snprintf(conninfo_repl, sizeof(conninfo_repl),
"%s dbname=replication replication=true", "%s dbname=replication replication=true fallback_application_name=walreceiver",
conninfo); conninfo);
streamConn = PQconnectdb(conninfo_repl); streamConn = PQconnectdb(conninfo_repl);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment