Hacking Postgres
Discuss wait-event coverage gaps; follow-up work added COPY file and program waits upstream.
Starting from an AI-assisted audit of missing wait-event coverage, the group distinguished genuine waits from CPU work and chose COPY as a testable first target. They reproduced an unreported wait in COPY FROM PROGRAM, prototyped events for program input and output, and used pg_stat_activity and pg_wait_sampling to validate them. The investigation also exposed missing coverage for ordinary COPY file reads and writes, expanding the planned patch to all four paths; the file/program work later reached core.
[timecodes · 8]
- AI-assisted audit of missing wait events
- Review discipline and excluding CPU work
- Choosing COPY FROM PROGRAM as the first target
- Reproducing the unreported external-program wait
- Prototyping COPY program wait events
- Testing COPY TO PROGRAM and separating code paths
- Discovering ordinary COPY file I/O gaps
- Validating coverage with pg_wait_sampling
direct mapping