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

B-Tree Index
The default index type in most databases that organizes data in a balanced tree structure for efficient searching, sorting, and range queries.
Database Index Types
Different index structures (B-tree, Hash, GIN, GiST, BRIN) optimized for various query patterns and data types.
Database Backup
The process of creating copies of database data to protect against data loss from failures, corruption, or human error.
Connection Pool
A cache of database connections that can be reused, avoiding the overhead of creating new connections for each request.
Partitioning
A technique of dividing large database tables into smaller, more manageable segments while maintaining a single logical table.
Deadlock
A situation where two or more transactions permanently block each other by each holding locks that the other needs.
View All Databases Terms โ†’