dataiotech Labs
dbaguidedbaguideDBAdataxtoolsdataopsphere
dbaguide.com
Home/Glossary/WAL vs Redo Log
WAL vs Redo LogDurability

Write-Ahead Logging / Redo Log (Önceden Yazılan Günlük)

The fundamental storage principle enforcing ACID durability: Changes must be fsynced to a sequential append-only log before buffer pages are written to data files.

Internal Architecture Breakdown

If a server suffers sudden loss of power, thousands of unwritten dirty memory pages vanish from RAM. Upon restart, the database engine initiates automated crash recovery:

  1. 1It locates the last verified persistent Checkpoint marker.
  2. 2It replays all sequential WAL/Redo log records produced from that checkpoint forward (REDO), restoring physical pages to their exact state at the moment of failure.
  3. 3It reverses any uncommitted transactions active at crash time (UNDO), guaranteeing 100% ACID consistency.

Production Inspection Queries

PostgreSQL
SHOW wal_level;
SHOW max_wal_size;
SELECT * FROM pg_stat_wal;
MySQL
SHOW VARIABLES LIKE 'innodb_log_file_size';
SHOW ENGINE INNODB STATUS;