]> granicus.if.org Git - postgresql/commitdiff
Have pg_receivexlog always send an invalid log position in status messages
authorMagnus Hagander <magnus@hagander.net>
Thu, 9 Feb 2012 13:12:49 +0000 (14:12 +0100)
committerMagnus Hagander <magnus@hagander.net>
Thu, 9 Feb 2012 13:12:49 +0000 (14:12 +0100)
This prevents pg_basebackup and pg_receivexlog from becoming a synchronous
standby in case 'write' is used for synchronous_commit.

Fujii Masao

src/bin/pg_basebackup/receivelog.c

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