Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit cd2b7d3

Browse files
committed
Fix streaming replication starting at the very first WAL segment.
Per complaint from Greg Stark.
1 parent aed0829 commit cd2b7d3

File tree

2 files changed

+2
-13
lines changed

2 files changed

+2
-13
lines changed

src/backend/replication/libpqwalreceiver/libpqwalreceiver.c

Lines changed: 1 addition & 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.3 2010/02/03 09:47:19 heikki Exp $
13+
* $PostgreSQL: pgsql/src/backend/replication/libpqwalreceiver/libpqwalreceiver.c,v 1.4 2010/02/25 07:31:40 heikki Exp $
1414
*
1515
*-------------------------------------------------------------------------
1616
*/
@@ -84,8 +84,6 @@ libpqrcv_connect(char *conninfo, XLogRecPtr startpoint)
8484
PGresult *res;
8585
char cmd[64];
8686

87-
Assert(startpoint.xlogid != 0 || startpoint.xrecoff != 0);
88-
8987
/* Connect */
9088
snprintf(conninfo_repl, sizeof(conninfo_repl), "%s replication=true", conninfo);
9189

src/backend/replication/walsender.c

Lines changed: 1 addition & 10 deletions
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.7 2010/02/18 11:13:46 heikki Exp $
33+
* $PostgreSQL: pgsql/src/backend/replication/walsender.c,v 1.8 2010/02/25 07:31:40 heikki Exp $
3434
*
3535
*-------------------------------------------------------------------------
3636
*/
@@ -573,15 +573,6 @@ XLogSend(StringInfo outMsg)
573573
/* use volatile pointer to prevent code rearrangement */
574574
volatile WalSnd *walsnd = MyWalSnd;
575575

576-
/*
577-
* Invalid position means that we have not yet received the initial
578-
* CopyData message from the slave that indicates where to start the
579-
* streaming.
580-
*/
581-
if (sentPtr.xlogid == 0 &&
582-
sentPtr.xrecoff == 0)
583-
return true;
584-
585576
/* Attempt to send all records flushed to the disk already */
586577
SendRqstPtr = GetWriteRecPtr();
587578

0 commit comments

Comments
 (0)