~/talk

Understanding Write-Ahead Logging (WAL) in PostgreSQL

Talkat PGConf India 2025 · 2025-03-05..03-07· [databases]
links:none on file
slides:none on file

Explains how WAL stores a sequential change log in 16 MB segments split into 8 KB pages, with LSNs formed from timeline/file/segment hex fields; WAL records include headers (LSN, XID, type), full-page images for first post-checkpoint writes, and commit markers. Details wal_writer, checkpoints (default timeout 30s), replication via wal sender/receiver and replication slots, and logical decoding currently decodes every record. Shows diagnostic tools pg_waldump and pg_walinspect and usage for recovery and incremental backups.

AI-written summary · about

  1. 0:00Introduction to WAL
  2. 0:57History of WAL in PostgreSQL
  3. 3:03Why WAL was introduced
  4. 4:27WAL buffer and commit process
  5. 7:17Key components of WAL
  6. 9:26WAL segment file structure
  7. 10:30WAL pages and records
  8. 11:32WAL record components
  9. 14:24Checkpoint process and WAL
  10. 19:50Recovery after crash
  11. 23:29WAL retention policies
  12. 27:25WAL in streaming replication
  13. 29:56WAL in logical replication
  14. 34:14WAL summarizer for backups
  15. 35:41WAL archiving for point-in-time recovery
  16. 36:02WAL sync commit levels
  17. 40:03WAL levels and performance
  18. 41:05Diagnosing WAL with pg_waldump
  19. 42:12Diagnosing WAL with pg_walinspect
  20. 42:56Summary and Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.