System Architecture 2-73

When the Daemons Flush the Buffer Pool

When the Daemons Flush the Buffer Pool
Buffer flushing is managed by thetbinit master daemon and performed by
tbinit or by one or moretbpgcl (page-cleaner) daemons. (If no tbpgcl
daemons have been configured for your OnLine server, thetbinit daemon
performs page-cleaner functions.)
Flushingthe modified shared-memory page buffers, the physical log buffer,
and the logical log buffer must be synchronized with page-cleaner activity
according to specific rules designed to maintain data consistency.
The overriding rule of buffer flushing is this: first flush the “before-images”
of modified pages to disk before you flush the modified pages themselves.
Inpractice, this means that the first physical log buffer is flushed and then the
buffers containing modified pages from the shared-memory buffer pool.
Therefore, even when the need to flush a shared-memory page buffer arises
because that buffer is needed by another user process (a foreground write,
refer topage 2-75), the page buffer cannot be flushed until it is verified that
the“before-image” of the page has already been written to disk. If this cannot
be verified, the physical log buffer must be flushed first, before the single
shared-memory page buffer is flushed. (Refer topage 2-74 for more infor-
mation about how this sequence of events is enforced.)
Buffer-pool flushing is initiated under any one of fourconditions:
A requirement for page cleaning, determined by the value of
LRU_MAX_DIRTY (refer topage 2-58)
Aneed to flush a full logical log buffer or physical log buffer (refer to
page 2-63 andpage 2-66, respectively)
Aneed to flush the logical log buffer after a committed transaction in
an unbuffered database (refer topage 2-66)
A need to execute a checkpoint (refer topage 2-70)