]> granicus.if.org Git - postgresql/commitdiff
Revert "Wake WALSender to reduce data loss at failover for async commit."
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 8 Jun 2012 03:07:03 +0000 (23:07 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 8 Jun 2012 03:07:03 +0000 (23:07 -0400)
This reverts commit 090e8a984cf1a8a3ef7f6db6dc919f843902d80c.
Since WalSndWakeup does not exist in 9.0, it's clear that this patch
wasn't even compiled in this branch.  Perhaps some variant of it is
appropriate in 9.0, but for the moment I'm just going to un-break
the buildfarm.

src/backend/access/transam/xlog.c

index 64d7660b38ba425f050cb4c128815bd8f096cbc4..3902c583134449e6873fddc5da4845245e91f65a 100644 (file)
@@ -2115,7 +2115,6 @@ XLogBackgroundFlush(void)
 {
        XLogRecPtr      WriteRqstPtr;
        bool            flexible = true;
-       bool            wrote_something = false;
 
        /* XLOG doesn't need flushing during recovery */
        if (RecoveryInProgress())
@@ -2184,18 +2183,10 @@ XLogBackgroundFlush(void)
                WriteRqst.Write = WriteRqstPtr;
                WriteRqst.Flush = WriteRqstPtr;
                XLogWrite(WriteRqst, flexible, false);
-               wrote_something = true;
        }
        LWLockRelease(WALWriteLock);
 
        END_CRIT_SECTION();
-
-       /*
-        * If we wrote something then we have something to send to standbys also,
-        * otherwise the replication delay become around 7s with just async commit.
-        */
-       if (wrote_something)
-               WalSndWakeup();
 }
 
 /*