Set fallback_application_name in walreceiver

Makes replication slaves identify themselves in the new
pg_stat_replication view.
This commit is contained in:
Magnus Hagander 2011-01-17 11:42:12 +01:00
parent 34ef02b4d4
commit 48075095ac
1 changed files with 2 additions and 2 deletions

View 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);