From 34c6d9611d23178539ed09b8f2ce40c5788a21cb Mon Sep 17 00:00:00 2001
From: Robert Haas <rhaas@postgresql.org>
Date: Mon, 3 Mar 2014 07:24:52 -0500
Subject: [PATCH] Use a longer buffer in libpqrcv_startstreaming.

Because of the new SLOT clause in the START_REPLICATION command, it's
possible for the command to end up too long for the old maximum buffer
length.

Andres Freund
---
 src/backend/replication/libpqwalreceiver/libpqwalreceiver.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/backend/replication/libpqwalreceiver/libpqwalreceiver.c b/src/backend/replication/libpqwalreceiver/libpqwalreceiver.c
index ecec8b34563..c10374cdbca 100644
--- a/src/backend/replication/libpqwalreceiver/libpqwalreceiver.c
+++ b/src/backend/replication/libpqwalreceiver/libpqwalreceiver.c
@@ -174,7 +174,7 @@ libpqrcv_identify_system(TimeLineID *primary_tli)
 static bool
 libpqrcv_startstreaming(TimeLineID tli, XLogRecPtr startpoint, char *slotname)
 {
-	char		cmd[64];
+	char		cmd[256];
 	PGresult   *res;
 
 	/* Start streaming from the point requested by startup process */
-- 
GitLab