Flush data to disk
Writing a buffer to disk is called buffer flushing.
When a user thread modifies data in a buffer, it marks the buffer as dirty. When the database server flushes the buffer to disk, it subsequently marks the buffer as not dirty and allows the data in the buffer to be overwritten.
- Buffer pool (covered in this section)
- Physical-log buffer
- Logical-log buffer
Page-cleaner threads manage buffer flushing. The database server always runs at least one page-cleaner thread. If the database server is configured for more than one page-cleaner thread, the LRU queues are divided among the page cleaners for more efficient flushing. For information about specifying how many page-cleaner threads the database server runs, see the CLEANERS configuration parameter in the HCL OneDB™ Administrator's Reference.
Flushing the physical-log buffer, the modified shared-memory page buffers, and the logical-log buffer must be synchronized with page-cleaner activity according to specific rules designed to maintain data consistency.