๐ŸŽ 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

Full-Text Search
A technique for searching natural language text in databases using word stemming, ranking, and relevance scoring.
Time-Series Database
A database optimized for storing and querying timestamped data points like metrics, sensor readings, and event logs.
CTE (Common Table Expression)
A temporary named result set defined within a SQL statement using the WITH clause, improving query readability and enabling recursion.
Crosstab Query
A query that transforms rows into columns, creating a pivot table view of aggregated data.
Query Optimization
The process of improving database query performance through indexing, query rewriting, and schema design techniques.
Trigger
A database object that automatically executes a specified function when certain events (INSERT, UPDATE, DELETE) occur on a table.
View All Databases Terms โ†’