Fix streaming replication starting at the very first WAL segment.

Per complaint from Greg Stark.
This commit is contained in:
Heikki Linnakangas 2010-02-25 07:31:40 +00:00
parent aed0829c63
commit cd2b7d3c4d
2 changed files with 2 additions and 13 deletions

View File

@ -10,7 +10,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/replication/libpqwalreceiver/libpqwalreceiver.c,v 1.3 2010/02/03 09:47:19 heikki Exp $
* $PostgreSQL: pgsql/src/backend/replication/libpqwalreceiver/libpqwalreceiver.c,v 1.4 2010/02/25 07:31:40 heikki Exp $
*
*-------------------------------------------------------------------------
*/
@ -84,8 +84,6 @@ libpqrcv_connect(char *conninfo, XLogRecPtr startpoint)
PGresult *res;
char cmd[64];
Assert(startpoint.xlogid != 0 || startpoint.xrecoff != 0);
/* Connect */
snprintf(conninfo_repl, sizeof(conninfo_repl), "%s replication=true", conninfo);

View File

@ -30,7 +30,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/replication/walsender.c,v 1.7 2010/02/18 11:13:46 heikki Exp $
* $PostgreSQL: pgsql/src/backend/replication/walsender.c,v 1.8 2010/02/25 07:31:40 heikki Exp $
*
*-------------------------------------------------------------------------
*/
@ -573,15 +573,6 @@ XLogSend(StringInfo outMsg)
/* use volatile pointer to prevent code rearrangement */
volatile WalSnd *walsnd = MyWalSnd;
/*
* Invalid position means that we have not yet received the initial
* CopyData message from the slave that indicates where to start the
* streaming.
*/
if (sentPtr.xlogid == 0 &&
sentPtr.xrecoff == 0)
return true;
/* Attempt to send all records flushed to the disk already */
SendRqstPtr = GetWriteRecPtr();