May 8, 2026
Database drama gets a black box
pg_flight_recorder: Continuously sample PostgreSQL system state via pg_cron
A new database black box arrives, but the crowd wants receipts and screenshots
TLDR: pg_flight_recorder is a new PostgreSQL add-on that keeps a rolling record of database activity so teams can investigate problems after the fact. Commenters liked the idea, but immediately demanded proof of what the reports look like and questioned why it doesn’t connect to their existing monitoring tools.
A new tool called pg_flight_recorder is pitching itself as a kind of black box for your database: it quietly keeps notes on what your system was doing every minute, so when everything catches fire later, you can rewind and ask, "what on earth happened here?" The sales pitch is slick: no extra helper apps, no sidecars, no constant outside poking around. Just install it, turn it on, and let it keep a rolling memory of trouble.
But in the comments, the real show began. The loudest reaction was basically: cool story, now show us the actual goods. One commenter immediately poked the weak spot in the demo, asking where the report output is and what it actually looks like. Ouch. That turned the mood from "neat idea" to "pics or it didn’t happen." Another commenter gave the project a much more skeptical side-eye, dismissing it as just metrics and asking where the export to the trendy observability world was. Translation for normal humans: if this tool collects data, some people want it to plug into the dashboards they already worship.
So the vibe is deliciously split: one camp sees a practical disaster diary for PostgreSQL, while the other is already demanding prettier evidence and better integration. The funniest part? Even with only two comments, the classic tech-drama formula appeared instantly: "This is promising" vs. "But why doesn’t it do my favorite thing?" In other words, the database detectives are interested — but they’re absolutely not clapping until they see the receipts.
Key Points
- •pg_flight_recorder continuously samples PostgreSQL system state in the background using pg_cron and does not require external agents, sidecars, or polling.
- •The tool captures operational data including wait events, sessions, locks, WAL activity, checkpoints, I/O, table and index statistics, query performance, replication state, and configuration changes.
- •Its architecture stores sampled activity in short-retention ring buffers and archives, while snapshots of broader system state are retained for longer periods.
- •The project is split into two extensions: pgfr_record for core collection and scheduling, and pgfr_analyze for reporting, anomaly detection, and time-travel analysis.
- •The article provides example workflows for health checks, incident response, XID/MultiXID wraparound monitoring, regression detection, hotspot analysis, unused index detection, and capacity planning.