Advanced testing with Injection Points
summary
A new backend feature called PostgreSQL 17 injection points lets tests run custom C callbacks at exact file/line locations; it stores names and cached function pointers in shared memory, supports dynamic library loading, and offers APIs to attach/detach/wait/wake callbacks and pass a private data blob. Tests use a SQL module and isolation tester to coordinate up to multiple waitpoints; set_local per-process scope keeps tests concurrent. The feature is committed and already catches real regressions in seconds.
AI-written summary · about
chapters (11)
- 0:00Introduction and speaker intro
- 1:23Why injection points were created
- 3:29Core requirements and design goals
- 8:06Existing proposals and limitations
- 13:03Implementation details and APIs
- 20:31Using injection points in tests
- 25:48Concurrent testing with isolation tester
- 31:02Real-world bug fix examples
- 35:37TAP test example and race condition
- 38:09Use cases and future improvements
- 41:45Q&A and closing remarks
related talks
50mAdvanced testing with Injection Points
53mFuture of table access methods
46mUse PostgreSQL to Step Up Your Game
46mInvestigating Multithreaded PostgreSQL
27mQuality Assurance in PostgreSQL
42mPostgreSQL Tips & Tricks For App Devs
44mDebugging your PL/pgSQL code
24mpgcov: Bringing Real Test Coverage to PostgreSQL Code
