PreImage Transaction Processing (also called PREIMG or "pre-image") provides high-speed and guaranteed atomic transactions without transaction logging. PreImage Transaction Processing enjoys many of the benefits of transaction control, including full commit and rollback, with a relatively small increase in processing overhead.
Unlike Full Transaction Processing, file updates are not logged to the server’s transaction logs. For this reason, PreImage files are not recoverable in the event of an abnormal server termination. In such a situation, a PreImage file is in an unknown state because an unknown number of updates may have not yet been written to disk at the time of the abnormal server termination.
Because automatic recovery does not process PreImage files, a PreImage file rebuilt after an abnormal server termination is not guaranteed to be in a consistent transaction state. In such a situation, PreImage files could contain data that was in the process of being committed but for which the commit had not yet been completed.
Because no protection from catastrophic failure is provided, it is important to provide other means for data recovery when using this mode.
The benefit of PREIMG is that it avoids the overhead associated with writing to and flushing the transaction logs. If atomicity is required for a file but recoverability is not, PREIMG may be an appropriate choice. Some specific cases in which PREIMG may be appropriate include:
To minimize loss of unwritten cached PREIMG file updates in the event of an abnormal server termination, consider using WRITETHRU for PREIMG files or periodically calling the FairCom DB API function CtreeFlushFile() to flush PREIMG data and index cache pages to disk.