]> granicus.if.org Git - postgresql/commitdiff
Set fallback_application_name in walreceiver
authorMagnus Hagander <magnus@hagander.net>
Mon, 17 Jan 2011 10:42:12 +0000 (11:42 +0100)
committerMagnus Hagander <magnus@hagander.net>
Mon, 17 Jan 2011 10:42:53 +0000 (11:42 +0100)
Makes replication slaves identify themselves in the new
pg_stat_replication view.

src/backend/replication/libpqwalreceiver/libpqwalreceiver.c

index c052df242f2452c094d5fdb54d17e678db6d84ac..c6e034d66f0a87beb6f7720197eb9a68becb8ab7 100644 (file)
@@ -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);