// readme

pg_wait_tracer

Working on this repository after 2026-11-10? docs/HANDOVER_2026-11-10.md is the handover: open release blockers, open PRs, the decisions left unmade, and where the measurement evidence lives. docs/OPERATING_MODEL.md describes how the work was run.

Real-time, tiered PostgreSQL wait event tracer.

pg_wait_tracer attaches to a running PostgreSQL cluster and observes wait events across all backends. It requires no PostgreSQL patches, no extensions, and no restarts.

It runs in two tiers (default --mode tiered):

  • An always-on, low-overhead sampled tier (ASH-style, pure userspace via process_vm_readv β€” ~0% impact on PostgreSQL) that you leave running 24/7.
  • On-demand or anomaly-triggered escalation to the exact hardware-watchpoint tier, which captures every wait_event_info transition with nanosecond precision during bounded, budgeted windows.

This gives you Active Session History continuously, plus exact, every-transition detail exactly when you need it β€” without paying the watchpoint overhead all the time. The sampler’s top-5 wait-event ranking matches the exact tier’s (5/5 events, every rate, every run measured)…