postgres=# select * from postgres_hacking where visibility = 'public';

Postgres hacking,
in public.

/* agentic Postgres hacking in public — we use AI heavily, inspect every detail, test the ugly edges, and take full responsibility for the result */

latest session

archive →

2026-07-15 · 50:53

Back to “log LSN on DROP TABLE”

Fix correctness and coverage of recovery landmarks for destructive DDL.

active work

view all →

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.

blocker: The current patch has acknowledged privilege-escalation and error-cleanup bugs; the next revision has not been posted yet.

Keep loadable slots for excluded table data so replacement data is restored before dependent indexes and constraints.

blocker: The first review raised interface questions; the patch needs a revised option design and another version.

also supporting

details →

pg_stat_statements scalability

Quan Hoang Truong + AWS contributors

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.

recent sessions

all 45 →
· 77:12 · youtube ↗

Agent hacking Postgres

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.

[timecodes · 8]
  1. Postgres 19 development opens and patches await review
  2. Kirk introduces the pg_dump placeholder patch
  3. Large-table dump and one-command restore use case
  4. Reviewing the option name and user interface
  5. Using AI to review design and mailing-list history
  6. Parallel chunks for restoring one large table
  7. Custom dump queries, filtering, and PII transformation
  8. B-tree leaf-page merge design and scan safety
active

correlated mapping
· 93:47 · youtube ↗

Wait-event tracing

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.

[timecodes · 8]
  1. Why sampled wait events miss short transitions
  2. Seven-patch tracing series and review structure
  3. Planning an independent overhead benchmark
  4. Designing high-transition pgbench workloads
  5. Five measurement levels and observer effect
  6. Stats versus full trace capture modes
  7. Correcting workload duration, rate limits, and logging
  8. Preliminary results and adding pg_stat_statements
active

direct mapping
· 78:11 · youtube ↗

Agentic Hacking Postgres

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.

[timecodes · 8]
  1. Recoverable decoding after a standby is lost
  2. Archive-fed WAL decoding without touching production
  3. Naming the feature: logical decoding from archive
  4. Reviewing the three-patch implementation
  5. TAP test registration and test readability
  6. Reviewing pause-on-conflict code and locking
  7. Patch readiness and concrete submission fixes
  8. Designing an end-to-end WAL-G recovery test
active

direct mapping
· 53:58 · youtube ↗

Logical replication from physical standbys on WAL shipping

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.

[timecodes · 8]
  1. Returning to logical decoding on WAL-shipping standbys
  2. Recovering useful changes from a broken pull request
  3. Reviewing pause and auto-resume patches
  4. Conflict horizons and synchronized-slot behavior
  5. Dirty slot state and restart-point persistence
  6. Live transcript-assisted code investigation
  7. Restructuring the work into reviewable patches
  8. Crash-safety invariant and correctness-first decision
active

direct mapping