Transactions - Write-Ahead Logging (Rollback journal) - WAL

Data System Architecture


Write-Ahead Logging (WAL) is a rollback journal implementation.

This implementation writes change directly to the rollback journal whereas the traditional rollback journal writes changes to the original database.

This rollback journal implementation has become the more prominent one because it enables non-blocking read and write.


The WAL represents a ledger of the changes the database plans to make to the database file (tables, indexes,…)

After a crash (or not), when the daemon first starts up, the process compares:

  • the data in the WAL.
  • the data in the database file.

to perform a sort of replication. It will:

  • rolls back any database file that is not committed in the WAL
  • apply any change on the database file that is committed in the WAL but isn’t in the database file


The Write-Ahead log implements transactions atomicity by:

  • preserving the original data
  • appending the changes into a separate WAL file.
  • commiting occurs by appending a special record into the WAL.

Non blocking - Read Write

As the COMMIT occurs without writing to the original data file, Read and write can then occurs simultaneously. Ie:

  • Read from the original database file
  • and write to the WAL

This means that :

Documentation / Reference

Discover More
Data System Architecture
Data Management - (Transaction|Request|Commit|Redo) Log

(Transaction|Request|commit) logs are structured log file store all changes made to the data as they occur. They permits the implementation of : transaction isolation undoable operation. recovery...
Data System Architecture
Sql - Commit

in SQL. In a SQL, a commit can be: explicit implicit or or Ansi Standard SQL: An explicit commit occurs when the COMMIT statement is executed. An implicit commit occurs automatically...
Data System Architecture
Transaction - Commit

A commit preserve the changes by creating a new version of the data. See also: Two-phase_commit_protocol A commit occurs by appending a special record into the WAL. A commit request that the changes...
Data System Architecture
Transaction - Isolation (Level|Degree) - (Locking Level ?)

Very early in the development of the transaction concept (ie lock concept), attempts were made to increase concurrency by providing weaker isolation level than the serialiable one. serializability defines...
Data System Architecture
Transaction - Traditional rollback journal

This page is the traditional implementation of the rollback journal (as opposed to a write-ahead log rollback journal) write-ahead log When a change occurs, the traditional rollback journal implements...
Data System Architecture
Transactions - Concurrent Read Consistency (multiversion read)

concurrent read data consistency (also known as multi version consistency) means that the database can present a view of data to multiple concurrent users, with each view consistent at a point in time....
Data System Architecture
Transactions - Rollback Journal (Undo journal)

A rollback journal consists of records of the actions of transactions, primarily before they are committed. Its name comes from the fact that its primary function is to roll back (undo) changes from...

Share this page:
Follow us:
Task Runner