PostgreSQL: Documentation: 17: 28.3. Write-Ahead Logging (WAL)
Write-Ahead Logging (WAL) is a standard method for ensuring data integrity. A detailed description can be found in most (if not all) books about transaction processing. Briefly, WAL's central concept is that changes to data files (where tables and indexes reside) must be written only after those changes have been logged, that is, after WAL records describing the changes have been flushed to permanent storage. If we follow this procedure, we do not need to flush data pages to disk on every transaction commit, because we know that in the event of a crash we will be able to recover the database using the log: any changes that have not been applied to the data pages can be redone from the WAL records. (This is roll-forward recovery, also known as REDO.) Because WAL restores database file contents after a crash, journaled file systems are not necessary for reliable storage of the data files or WAL files. In fact, journaling overhead can reduce performance, especially if journaling causes fi
Write-Ahead Logging (WAL) is a standard method for ensuring data integrity. A detailed description can be found in most (if not all) books about transaction processing. Briefly, WAL's central concept is that changes to data files (where tables and indexes reside) must be written only after those changes have been logged, that is, after WAL records describing the changes have been flushed to permanent storage. If we follow this procedure, we do not need to flush data pages to disk on every transaction commit, because we know that in the event of a crash we will be able to recover the database…
saved by
related reading
- Postgres WAL Files and Sequence Numbers | Crunchy Data Blogcrunchydata.com
- Exploring versions of the Postgres logical replication protocolblog.peerdb.io
- Patching the PostgreSQL JDBC Driverengineering.zalando.com
- Write-Ahead Loggingsqlite.org
- 8.20. pg_lsn Typepostgresql.org
- Recovery - Database Systemscs186berkeley.net
- 28.5. WAL Configurationpostgresql.org
- Build Your Own Databasenan.fyi
- From monolith to Lakebase to LTAP: rethinking the database from storage up | Databricks Blogdatabricks.com
- Durability & Consistency - ZeroFS Documentationzerofs.net
- How To Corrupt An SQLite Database Filesqlite.org
- Database Fundamentalstontinton.com