Fix position of WalSndWakeupRequest call.
authorRobert Haas <rhaas@postgresql.org>
Mon, 2 Jul 2012 18:43:10 +0000 (14:43 -0400)
committerRobert Haas <rhaas@postgresql.org>
Mon, 2 Jul 2012 18:44:10 +0000 (14:44 -0400)
This avoids discriminating against wal_sync_method = open_sync or
open_datasync.

Fujii Masao, reviewed by Andres Freund

src/backend/access/transam/xlog.c

index 7deb90134807ef349c9d89fd84022c3e2558f7b8..aff6136f9a8c854fb725e55759fdb62caa251ee9 100644 (file)
@@ -1867,10 +1867,11 @@ XLogWrite(XLogwrtRqst WriteRqst, bool flexible, bool xlog_switch)
            }
 
            issue_xlog_fsync(openLogFile, openLogSegNo);
-
-           /* signal that we need to wakeup walsenders later */
-           WalSndWakeupRequest();
        }
+
+       /* signal that we need to wakeup walsenders later */
+       WalSndWakeupRequest();
+
        LogwrtResult.Flush = LogwrtResult.Write;
    }