Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Set the write location in the pg_receivexlog status messages
authorMagnus Hagander <magnus@hagander.net>
Wed, 4 Jul 2012 13:13:09 +0000 (15:13 +0200)
committerMagnus Hagander <magnus@hagander.net>
Wed, 4 Jul 2012 13:15:02 +0000 (15:15 +0200)
This makes it possible for the master to track how much data has
actually been written my pg_receivexlog - and not just how much
has been sent towards it.

src/bin/pg_basebackup/receivelog.c

index 9dd94e1140683ee7ec2c44cb8d1866b980ff7b46..1e1ce59a79d198bdab4f29fe518994794492898b 100644 (file)
@@ -359,7 +359,7 @@ ReceiveXlogStream(PGconn *conn, XLogRecPtr startpos, uint32 timeline, char *sysi
            char        replybuf[sizeof(StandbyReplyMessage) + 1];
            StandbyReplyMessage *replymsg = (StandbyReplyMessage *) (replybuf + 1);
 
-           replymsg->write = InvalidXLogRecPtr;
+           replymsg->write = blockpos;
            replymsg->flush = InvalidXLogRecPtr;
            replymsg->apply = InvalidXLogRecPtr;
            replymsg->sendTime = now;