2929 *
3030 *
3131 * IDENTIFICATION
32- * $PostgreSQL: pgsql/src/backend/replication/walsender.c,v 1.25 2010/06/0322:17:32 tgl Exp $
32+ * $PostgreSQL: pgsql/src/backend/replication/walsender.c,v 1.26 2010/06/0323:00:14 tgl Exp $
3333 *
3434 *-------------------------------------------------------------------------
3535 */
@@ -641,7 +641,7 @@ XLogRead(char *buf, XLogRecPtr recptr, Size nbytes)
641641}
642642
643643/*
644- * Read up to MAX_SEND_SIZE bytes of WAL that's been written(and flushed) ,
644+ * Read up to MAX_SEND_SIZE bytes of WAL that's been writtento disk ,
645645 * but not yet sent to the client, and send it.
646646 *
647647 * msgbuf is a work area in which the output message is constructed. It's
@@ -662,7 +662,11 @@ XLogSend(char *msgbuf, bool *caughtup)
662662Size nbytes ;
663663WalDataMessageHeader msghdr ;
664664
665- /* Attempt to send all records flushed to the disk already */
665+ /*
666+ * Attempt to send all data that's already been written out from WAL
667+ * buffers (note it might not yet be fsync'd to disk). We cannot go
668+ * further than that given the current implementation of XLogRead().
669+ */
666670SendRqstPtr = GetWriteRecPtr ();
667671
668672/* Quick exit if nothing to do */
@@ -744,7 +748,7 @@ XLogSend(char *msgbuf, bool *caughtup)
744748
745749pq_putmessage ('d' ,msgbuf ,1 + sizeof (WalDataMessageHeader )+ nbytes );
746750
747- /* Flush pending output */
751+ /* Flush pending outputto the client */
748752if (pq_flush ())
749753return false;
750754