Loading the code workspace…
Write a C program that implements crash recovery for a key-value store using WAL.
Requirements:
This analysis-redo-undo sequence is a simplified version of the ARIES algorithm IBM published in 1992, which PostgreSQL, MySQL InnoDB, and SQL Server all still implement for crash recovery. Getting the LSN comparison wrong is exactly the class of bug behind 2018's PostgreSQL 'fsyncgate', where recovery silently skipped writes the OS had actually failed to persist.