Write ahead log (WAL) used to provide database data fault tolerance in the case of system/hardware failures. WAL recovery logs used in automatic recovery procedure get the most actual and consistent database state before a crash.
Database WAL mode activated by the following IWKV_OPTS.wal
settings:
IWKV_OPTS opts = { ... .wal = { .enabled = true, // WAL Enabled/Disabled // Time period between WAL file sync at consistent database state. Defaut: 10 seconds .savepoint_timeout_sec = 10, // Time period between WAL checkpoints. Default: 5 min. .checkpoint_timeout_sec = 300, // Size of internal memory buffer for WAL operations. Default 8Mb .wal_buffer_sz = 8 * 1024 * 1024, // Maximum amount of memory used by duty pages. Overflow causes WAL checkpoint. // Default: 1Gb .checkpoint_buffer_sz = 1ULL * 1024 * 1024 * 1024 } };
MAP_PRIVATE
.checkpoint_buffer_sz
.checkpoint_timeout_sec
timeout occuriedMAP_SHARED
MAP_PRIVATE
for database file.If database opened with WAL enabled option and found not empty WAL log on file system it will be applied to the database file until last successful savepoint.