๐ŸŽ New User? Get 20% off your first purchase with code NEWUSER20 ยท โšก Instant download ยท ๐Ÿ”’ Secure checkout Register Now โ†’
Menu

Categories

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.

Related Terms

Elastic Search
A distributed search and analytics engine built on Apache Lucene, optimized for full-text search and log analysis.
MVCC (Multi-Version Concurrency Control)
A technique where the database maintains multiple versions of data to allow concurrent reads and writes without locking.
Materialized View
A database object that stores the precomputed result of a query, offering faster reads at the cost of periodic refresh.
Query Optimization
The process of improving database query performance through indexing, query rewriting, and schema design techniques.
Connection String
A formatted string containing all parameters needed to establish a connection to a database server.
Database Proxy
A middleware server that sits between applications and databases, providing connection pooling, load balancing, and query routing.
View All Databases Terms โ†’