Buffer table
The buffer table tracks the addresses and status of the individual buffers in the shared-memory pool.
When a buffer is used, it contains an image of a data or index page from disk. For more information about the purpose and content of a disk page, see Pages.
- Buffer status
- Buffer status is described as empty, unmodified, or modified. An unmodified buffer contains data, but the data can be overwritten. A modified (dirty) buffer contains data that must be written to disk before it can be overwritten.
- Current lock-access level
- Buffers receive lock-access levels depending on the type of operation that the user thread is executing. The database server supports two buffer lock-access levels: shared and exclusive.
- Threads waiting for the buffer
- Each buffer header maintains a list of the threads that are waiting for the buffer and the lock-access level that each waiting thread requires.
Each database server buffer has one entry in the buffer table.
For information about the database server buffers, see Resident portion of shared memory. For information about how to monitor the buffers, see Monitor buffers.
The database server determines the number of entries in the buffer-table hash table, based on the number of allocated buffers. The maximum number of hash values is the largest power of 2 that is less than the value of buffers, which is specified in one of the BUFFERPOOL configuration parameter fields.