]> granicus.if.org Git - postgresql/commitdiff
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:14:49 +0000 (15:14 +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 064315f8dbc7c7833fd8a1b1251bae271e02934f..e6c2dec6ef2b65d4742a07cf9d2c9a724b649bad 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;