Administrator Guide : Performance tuning : Logging and transaction durability : Background
  
Background
When a transaction is committed, the database server writes data to two locations: the database file, and the transaction log file. However, the data is not necessarily written to those two locations at the same time. When a transaction is committed, the server normally writes the data to the transaction log file immediately, that is, as soon as the server commits the transaction. The server does not necessarily write the data to the database file immediately. The server may wait until it is less busy, or until it has accumulated multiple changes, before writing the data to the database file.
If the server shuts down abnormally (for example, due to a power failure) before all data has been written to the database file, the server can recover 100% of committed data by reading the combination of the database file and the transaction log file. Any changes since the last write to the database file are in the transaction log file. The server can read those changes from the log file and then use that information to update the database file. The process of reading changes from the log file and updating the database file is called recovery. At the end of the recovery process, the database file is 100% up to date.
The recovery process is automatically executed always when the server restarts after an abnormal shutdown. The process is generally invisible to the user (except that there may be a delay before the server is ready to respond to new requests).
To have 100% recovery, you must have 100% of the transactions written to the log file. Normally, the database server writes data to the log file at the same time that the server commits the data. Thus committed transactions are stored on disk and are not lost if the computer is shut down abnormally. This is called strict durability. The data that has been committed is durable, even if the server is shut down abnormally.
With strict durability, the user is not told that the data has been committed until after that data was successfully written to the transaction log on disk. Strict durability ensures that the data is recoverable if the server shuts down abnormally. Strict durability makes it almost impossible to lose committed data unless the hard disk drive itself fails.
If durability is relaxed, the user may be told that the data has been committed even before the data has been written to the transaction log on disk. The server may choose to delay writing the data, for example, by waiting until there are several transactions to write. If durability is relaxed, the server may lose a few committed transactions if there is a power failure before the data is written to disk.
solidDB® allows to control the durability level in variety of ways. For the server-wide setting, the parameter Logging.DurabilityLevel may take three values: 3 (for “strict”), 1 (for “relaxed”) and 2 (for “adaptive”).
Adaptive durability is meant for HotStandby operation. If durability is adaptive, the server follows the rules below:
If the server is a Primary server in a HotStandby system, and if the Secondary is active, then the server (Primary server) uses relaxed durability;
In all other situations, the server uses strict durability.
Notes
The above behavior is observed only if the value of the [HotStandby] parameter SafenessLevel is set to 2safe (default). If this parameter is set to any other value, the server uses relaxed durability in all cases.
If HotStandby is not enabled, the “adaptive” setting is treated as “strict”.
See also
Logging and transaction durability