pg_flight_recorder: Continuously sample PostgreSQL system state via pg_cron
Summary
pg_flight_recorder is a server-side flight recorder for PostgreSQL that continuously samples system state using pg_cron, without external agents. It collects wait events, sessions, locks, WAL activity, checkpoints, I/O, table and index stats, query performance, replication state, and configuration changes, storing data in ring buffers with archival retention. Safety mechanisms like circuit breakers and load shedding help keep production impact minimal.