From: Magnus Hagander Date: Mon, 17 Jan 2011 10:42:12 +0000 (+0100) Subject: Set fallback_application_name in walreceiver X-Git-Tag: REL9_1_ALPHA4~437 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=48075095ac3ce1aaa63624ea0148dbe5bcba3b09;p=postgresql Set fallback_application_name in walreceiver Makes replication slaves identify themselves in the new pg_stat_replication view. --- diff --git a/src/backend/replication/libpqwalreceiver/libpqwalreceiver.c b/src/backend/replication/libpqwalreceiver/libpqwalreceiver.c index c052df242f..c6e034d66f 100644 --- a/src/backend/replication/libpqwalreceiver/libpqwalreceiver.c +++ b/src/backend/replication/libpqwalreceiver/libpqwalreceiver.c @@ -78,7 +78,7 @@ _PG_init(void) static bool libpqrcv_connect(char *conninfo, XLogRecPtr startpoint) { - char conninfo_repl[MAXCONNINFO + 37]; + char conninfo_repl[MAXCONNINFO + 75]; char *primary_sysid; char standby_sysid[32]; TimeLineID primary_tli; @@ -92,7 +92,7 @@ libpqrcv_connect(char *conninfo, XLogRecPtr startpoint) * "replication" for .pgpass lookup. */ snprintf(conninfo_repl, sizeof(conninfo_repl), - "%s dbname=replication replication=true", + "%s dbname=replication replication=true fallback_application_name=walreceiver", conninfo); streamConn = PQconnectdb(conninfo_repl);