Fix a stupid bug I introduced into XLogFlush().
authorRobert Haas <rhaas@postgresql.org>
Mon, 2 Jul 2012 19:33:59 +0000 (15:33 -0400)
committerRobert Haas <rhaas@postgresql.org>
Mon, 2 Jul 2012 19:33:59 +0000 (15:33 -0400)
Commit f11e8be3e812cdbbc139c1b4e49141378b118dee broke this; it was right
in Peter's original patch, but I messed it up before committing.

src/backend/access/transam/xlog.c

index aff6136f9a8c854fb725e55759fdb62caa251ee9..3f3f9a3727b1c83e75d40b35fe447a18bf12d13b 100644 (file)
@@ -2105,7 +2105,10 @@ XLogFlush(XLogRecPtr record)
        /* Got the lock; recheck whether request is satisfied */
        LogwrtResult = XLogCtl->LogwrtResult;
        if (XLByteLE(record, LogwrtResult.Flush))
+       {
+           LWLockRelease(WALWriteLock);
            break;
+       }
 
        /*
         * Sleep before flush! By adding a delay here, we may give further