Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 59292f2

Browse files
committed
Flush CopyOutResponse when starting streaming in walsender, so that it's
not delayed until the first WAL record is sent. Fujii Masao
1 parent 65cd829 commit 59292f2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/backend/replication/walsender.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
*
3131
*
3232
* IDENTIFICATION
33-
* $PostgreSQL: pgsql/src/backend/replication/walsender.c,v 1.12 2010/03/24 21:41:57 sriggs Exp $
33+
* $PostgreSQL: pgsql/src/backend/replication/walsender.c,v 1.13 2010/03/26 12:23:34 heikki Exp $
3434
*
3535
*-------------------------------------------------------------------------
3636
*/
@@ -263,6 +263,7 @@ WalSndHandshake(void)
263263
pq_sendbyte(&buf, 0);
264264
pq_sendint(&buf, 0, 2);
265265
pq_endmessage(&buf);
266+
pq_flush();
266267

267268
/*
268269
* Initialize position to the received one, then the

0 commit comments

Comments
 (0)