TurboIMAGE/XL Database Management System Reference Manual MPE/iX V6.5 (30391-90011)

488 Chapter10
Internal Structures and Techniques
MPE/iX Transaction Management
MPE/iX Transaction Management
When AUTODEFER is not enabled, TurboIMAGE/XL uses an internal MPE/iX service,
called Transaction Management (XM), to ensure physical consistency of the database, to
reduce physical disk I/O, to perform Intrinsic Level Recovery (ILR), and to perform
dynamic roll-back recovery.
When XM is used, modifying intrinsics (DBPUTs, DBDELETEs, and DBUPDATEs) are bracketed
as XM transactions. XM logs these transactions in its own XM log file. The volume set is
the XM unit of logging and recovery. Each volume set has one XM log file.
In default recovery mode, TurboIMAGE/XL uses XM to ensure the structural integrity of
the database. The writes of each database modification (every DBPUT, DBUPDATE and
DBDELETE) are bracketed as an XM transaction and logged to XM log file pages. XM log file
pages are written to disk when one of the following occurs:
1. A system-specified time has elapsed.
2. A request is made by a subsystem, such as, TurboIMAGE/XL, or another process to
flush the log file to disk.
3. The XM buffer (or log file pages) is full.
Thus, intrinsics that have completed may not yet be written to disk. If a system failure
occurs, only completed modifications that have been written to disk are recovered.
When the operating system is restarted, the physical integrity of the database is recovered
via XM recovery. However, the "user defined" logical transactions affecting logical
consistency and needing recovery are not processed at this time. Instead, they are posted
to a hidden global file called the "AUX" file. When the very first DPOPEN is processed on the
system, this "AUX" file is processed, and the transactions pertaining to the same database
are posted to their respective "00" file (
dbname
00). Subsequently, when the first DBOPEN for
a specific database is done, its "00" file will be processed to restore the logical consistency
of the database.
A dynamic transaction is denoted by the DBXBEGIN and DBXEND intrinsics. With dynamic
roll-back recovery, a dynamic transaction is rolled back with a program abort or with a call
to DBXUNDO. DBXUNDO can be called when other database activity is occurring.
ILR is similar to TurboIMAGE/XL in that it also uses XM. When ILR is enabled, changes
to data sets are bracketed as XM transactions and logged to XM log file pages. With ILR,
however, XM log file pages are written to disk at the end of each completed DBDELETE and
DBPUT. If a system failure occurs, only one DBPUT or DBDELETE will not be recovered. (A
completed DBUPDATE does not force a log write to disk.)
When AUTODEFER is enabled, MPE/iX Transaction Management is not used. Instead,
AUTODEFER uses the MPE/iX file system defaults which keep data pages in memory until
lack of memory or the closing of a file forces the pages to be written to disk. In this mode, a
system failure can cause the loss of database integrity unless roll-forward recovery is used.