Kbase 21543: Write-Ahead Logging, Buffered and Unbuffered AI Extents Explained
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  15/10/2008 |
|
Status: Verified
GOAL:
Write-Ahead Logging, Buffered and Unbuffered AI Extents Explained
FIX:
A key requirement for the Progress database recovery is the ability to issue reliable I/O operations. It is especially important that I/O be reliable when writing to either the BI or AI file so that the database can provide crash recovery and transaction durability. When Progress issues an unbuffered write system call to write some log data, the assumption is that the data is placed on the disk media before the write system call returns. Progress uses UNBUFFERED after-image I/O by default. Progress allows BUFFERED after-image I/O for single AI file only. Writes to multi-volume AI extents are always UNBUFFERED.
Buffered I/O can provide increased performance, but it also adds some risk. If a database needs reconstruction from AI files, some transactions that completed before the crash can be lost. Unbuffered AI means Progress's normal write-ahead logging rules for the BI file, apply to the AI file as well.
In write-ahead logging, all database changes are recorded and written to the log *first* and later to the database. This way, the data in the before-image file or the after-image file can be used to repeat or redo the changes if they are never written to the database. This technique also allows database changes to be stored in memory indefinitely before they are written to disk.
To specify whether to buffer AI writes when enabling after-imaging, use the following command:
Rfutil db-name -C aimage begin {buffered/unbuffered} -a ai-name
- Or -
Once after-imageing is enabled for the database, change AI buffering by using this command:
Rfutil db-name -C aimage change {buffered/unbuffered} -a ai-name