IT lexicon › Database › Transaction Log

Transaction Log

Database På svenska → Updated: 2026-11-10

A sequential record of every change before it hits the database, used to recover from crashes and restore the database to a consistent state.

If a crash strikes mid-transaction, you don't want partially completed changes left behind. The solution is write-ahead logging (WAL): before anything changes on disk, the operation is logged first. On restart, the database replays the log: anything logged but incomplete is rolled back, and anything fully logged is replayed forward. The log itself lives in a safe place, often on a different physical drive than the database.

Older systems had no protection; a server crash could corrupt the entire database. Modern databases are nearly crash-proof because of WAL.

← Back to the lexicon