Ptrack 2.0: yet another block-level incremental backup engine
summary
Ptrack 2.0 is an extension that implements block-level incremental backups by tracking page writes at the storage manager and storing per-page LSNs in a single shared hash table mmap'ed from disk as a mmap'ed map with CRC32 that is atomically replaced at checkpoint. It is lockless using atomics, uses a fixed-size table (64 MB can cover ~64 GB without false negatives), allows false positives but never misses changes, and shows about 1–3% TPS overhead in benchmarks while integrating with pg_probackup.
AI-written summary · about
chapters (13)
- 0:00Introduction to Ptrack
- 2:20Motivation for incremental backups
- 4:24Page vs delta backup methods
- 7:24First Ptrack version overview
- 11:03Drawbacks of first implementation
- 17:31Second Ptrack version design
- 21:56In-memory data structure
- 24:06Tracking page modifications
- 26:15Durability and crash recovery
- 29:51Limitations of new version
- 31:42User-facing SQL API
- 35:15Benchmark results
- 38:52Q&A session
