Databases
Advanced
What is Write-Ahead Log (WAL)?
A technique where changes are first written to a log before being applied to the database, ensuring crash recovery and data integrity.
Write-Ahead Logging is fundamental to database reliability. Before any data modification is written to the actual data files, it is first recorded in a sequential log. If the database crashes, it can replay the WAL to recover committed transactions and undo incomplete ones. PostgreSQL uses WAL extensively - it powers crash recovery, point-in-time recovery (PITR), streaming replication, and logical replication. WAL settings like wal_level, max_wal_size, and checkpoint_timeout directly impact performance and recovery capabilities.
Learn More About This Topic
Related reading
โฌ9.90
Related reading
โฌ18.90
Related reading
โฌ16.90
Related Terms
Materialized View
Index
Trigger
View
JSONB
Data Warehouse
View All Databases Terms โ