postgres.git / summary / log / commit / refs
commit 48075095ac3ce1aaa63624ea0148dbe5bcba3b09
Author: Magnus Hagander <magnus@hagander.net>
Date: Mon Jan 17 10:42:12 2011 +0000
First released in: 9.1.0
Set fallback_application_name in walreceiver
Makes replication slaves identify themselves in the new
pg_stat_replication view.
src/backend/replication/libpqwalreceiver/libpqwalreceiver.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/replication/libpqwalreceiver/libpqwalreceiver.c b/src/backend/replication/libpqwalreceiver/libpqwalreceiver.c
index c052df242f2..c6e034d66f0 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);
[parent: 34ef02b4d4c0]