~/talk

Advanced testing with Injection Points

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

PostgreSQL 17 adds injection points as a developer testing toolkit built into core (enabled at configure time) with two API files injection_point.c/injection_point.h and a shared‑memory array plus a per‑process cache for loaded points. Tests load callbacks from libraries, use a small test extension that provides SQL functions to attach/detach, wait/wake, set_local, and now supports runtime arguments and cached points so callbacks run inside critical sections safely. Used in CI, it reproduces race conditions (Noah’s isolation test with ~10–20 permutations), fixes reindex and checkpoint races, and stabilizes standby logical decoding tests.

AI-written summary · about

  1. 0:00Introduction and motivation
  2. 13:22Core implementation details
  3. 23:39Test facilities and SQL functions
  4. 33:57Practical examples and use cases
  5. 49:00Q&A and future plans
~/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.