Hi hackers,
Following up on the discussion about wait event coverage for COPY operations [1], here's a tiny patch that adds two new IO wait events:
- COPY_DATA_READ: COPY FROM blocking on file/program read
- COPY_DATA_WRITE: COPY TO blocking on file/program write
This enables diagnosing for cases like:
- storage I/O bottlenecks during bulk loads slow exports to files (COPY FROM/TO '/path/to/file')
- pipe buffer congestion in ETL pipelines (COPY FROM/TO PROGRAM)
Note: as it turned out, COPY FROM/TO STDIN/STDOUT already have coverage via Client/ClientRead and Client/ClientWrite at the protocol layer (thus, pg_dump/pg_restore are already covered). So only file/program cases needed instrumentation.
Nikx