The WFLUSH command forces some or all of the WAL log records in memory to disk.
- Flushes the WAL log to disk, up to and including the memory buffer containing the specified WAL log sequence number (WLSN).
Blocks of WAL log records are accumulated in memory buffers. When the current buffer fills, a write is initiated, and a new buffer becomes the current buffer (that is, a “buffer switch” occurs). A transaction can force the log to disk, up to a specified WLSN, to insure that the transaction is recorded safely.
You can use the WFLUSH command to force some or all of the buffers to disk manually. If writes are already in progress, WFLUSH waits for those writes to complete. If the current buffer is flushed, a buffer switch occurs.
Flushing the WAL log to disk is a very simple, low risk operation. One reason to flush the WAL log to disk is so that you can use normal Filer commands, such as WREC and WAL, to examine recent log records. This might be necessary because Filer does not examine the log buffers when displaying log records. For more information about the WREC or WAL commands, see WREC or WAL.