Skip to content

Commit 75867c5

Browse files
Minor tweaks on libpqrcv_connect(): ensure conninfo_repl[] is
correctly sized and expand comment to explain otherwise undocumented use of replication connection parameter.
1 parent aa36bd2 commit 75867c5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/backend/replication/libpqwalreceiver/libpqwalreceiver.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*
1111
*
1212
* IDENTIFICATION
13-
* $PostgreSQL: pgsql/src/backend/replication/libpqwalreceiver/libpqwalreceiver.c,v 1.5 2010/02/26 02:00:58 momjian Exp $
13+
* $PostgreSQL: pgsql/src/backend/replication/libpqwalreceiver/libpqwalreceiver.c,v 1.6 2010/03/19 17:51:42 sriggs Exp $
1414
*
1515
*-------------------------------------------------------------------------
1616
*/
@@ -76,15 +76,15 @@ _PG_init(void)
7676
static bool
7777
libpqrcv_connect(char *conninfo, XLogRecPtr startpoint)
7878
{
79-
char conninfo_repl[MAXCONNINFO + 14];
79+
char conninfo_repl[MAXCONNINFO + 18];
8080
char *primary_sysid;
8181
char standby_sysid[32];
8282
TimeLineID primary_tli;
8383
TimeLineID standby_tli;
8484
PGresult *res;
8585
char cmd[64];
8686

87-
/* Connect */
87+
/* Connect using deliberately undocumented parameter: replication */
8888
snprintf(conninfo_repl, sizeof(conninfo_repl), "%s replication=true", conninfo);
8989

9090
streamConn = PQconnectdb(conninfo_repl);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy