Databases · Senior · Question 4 of 75
What is the purpose of the write-ahead log (WAL)?
- 1It stores a backup of each table every hour
- ✓Correct answer: Changes are written to a sequential log and flushed before commit, so the database can recover after a crash and stream changes to replicas
- 3It logs all SELECT queries for auditing
Explanation
Data pages can be written to disk later in the background. WAL also powers physical replication, logical decoding and point-in-time recovery.