~/talk

Fraught Feedback: Trying and Failing to Implement Adaptive Behavior in Postgres

Talkat PGConf.dev 2025 · 2025-05-13..05-16· [databases, machine-learning]
slides:none on file

Attempts use a PID-style feedback controller to pace autovacuum by converting desired removal rates into per-page delays (example: 1,000 dead tuples/sec, ~40 tuples/page → 40 ms/page) but the prototype (CSV logging, hacky patch) runs into deadline, phase-1/phase-3 and multi-table scheduling problems and ends with delays often zero. Predictive work builds per-table age distributions and a target freeze duration but needs a full histogram in shared memory stats, proves complex, and yields a simple pragmatic fix: stop scanning all-visible pages when freezing fails.

AI-written summary · about

  1. 0:00Introduction
  2. 1:56Why adaptive algorithms
  3. 4:24Types of adaptive algorithms
  4. 6:32Feedback controller for vacuum
  5. 10:06Deadline-based vacuum pacing
  6. 18:30Flexible vacuum rate control
  7. 21:22Testing the vacuum controller
  8. 24:07Challenges with evaluation criteria
  9. 26:58Is pacing the right approach
  10. 28:00XID wrap-around and freezing
  11. 29:50Current freezing strategies
  12. 32:02Predictive freezing proposal
  13. 36:00Rethinking freezing criteria
  14. 39:30Target freeze duration
  15. 41:39Hot tail workload results
  16. 43:04Insert-only table issues
  17. 45:50Complexity of histogram tracking
  18. 47:15Simpler freezing approach
  19. 48:39Lessons learned from failure
  20. 50:04Conclusion 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.