Precise wait-event timing and tracing
needs reviewLow-overhead core timing, trace capture, coverage analysis, independent observer-effect benchmarks, and related work to expose currently invisible waits.
postgres=# select * from postgres_hacking where visibility = 'public';
/* agentic Postgres hacking in public — we use AI heavily, inspect every detail, test the ugly edges, and take full responsibility for the result */
2026-07-15 · 50:53
Fix correctness and coverage of recovery landmarks for destructive DDL.
Low-overhead core timing, trace capture, coverage analysis, independent observer-effect benchmarks, and related work to expose currently invisible waits.
Log the correct commit-record LSN for DROP TABLE and related destructive operations to make PITR recovery less guessy.
Keep logical slots usable on a standby fed by WAL archives by pausing and safely resuming recovery around conflicts.
Inspired by the October 29 Hacking Postgres session, viewer Adam Brusselback implemented WHERE support for targeted REFRESH MATERIALIZED VIEW and has continued revising it through review.
Compress or batch larger WAL records, originating in B-tree build experiments.
Negotiate custom command-completion tags through a _pq_ protocol capability.
Salma El-Sayed’s implementation, mentored by Kirk Wolak, merges sparse siblings and reclaims merged-away tombstone pages without rebuilding the entire index.
Keep loadable slots for excluded table data so replacement data is restored before dependent indexes and constraints.
Dmitry’s pg_wait_tracer and core wait-event timing work, supported here with design sessions, reviews, coverage analysis, and independent benchmarks.
A proposed GSoC project that continued independently: systematically identify invisible waits and add coverage, starting with blocking writes to server logging destinations.
Quan continued the proposed GSoC work on LWLock contention. In parallel, an AWS-led patch series implements a broader pgstat-based redesign for the same scalability problem.
Agent-assisted patch work around the wait-event timing submission.
The group reviewed Kirk Wolak's pg_dump patch for keeping loadable placeholders when table data is excluded, grounding the discussion in his large-table restore workflow. They debated a positive interface, filter-file actions, arbitrary dump queries, PII transformation, and referential-integrity risks, then posted supportive review feedback to pgsql-hackers. The final segment examined Salma El-Sayed's B-tree leaf-page merge design, including merged-page markers, scan correctness, vacuum cleanup, and review plans.
Independent benchmarks, observer effect, coverage, and patch restructuring.
Dmitry Fomin presented a seven-patch wait-event tracing series, split for review but intended to provide complete transition timing and query attribution. The group designed an independent benchmark ladder covering vanilla, compiled-disabled, stats, and full trace modes; corrected pgbench workloads; and distinguished static overhead from observer effect. Preliminary runs showed no clear slowdown, but they added pg_stat_statements, wait-event counts, repeated rounds, raw results, and independent review before submission.
End-to-end tests for archive-fed logical decoding and pause/resume behavior.
The session refined logical decoding from an archive-fed physical standby as a recoverable, production-independent pipeline: after losing the decoding node, a consumer can restore another standby at the acknowledged LSN and tolerate overlap. They reviewed the three-patch implementation and TAP test, found registration and naming issues, debated lock structure, and judged the code ready for discussion after fixes. They then specified an end-to-end WAL-G test with catalog churn, paused consumption, catch-up, and a final marker.
Refine recovery pause behavior, crash safety, promotion, and auto-resume.
The group inspected two AI-produced patch branches for pausing archive recovery when replay would invalidate a logical slot. They reconstructed the patch series, reviewed synchronized-slot and promotion behavior, and clarified that dirty slot state is only persisted at restart points, weakening crash guarantees. The concrete conclusion was to favor correctness, consolidate the work into one reviewable three-patch series, preserve readable code over premature lock optimization, and target the July CommitFest after further testing.