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.

[1]
https://www.postgresql.org/message-id/flat/CAM527d9PkaSj-gNjLZqjJXnqaWTD8kHPtm2Yj8-1Gh_0pTRgDA%40mail.gmail.com

Nikx

Attachment: v1-0001-Add-IO-wait-events-for-COPY-file-program-operations.patch
Description: Binary data

Reply via email to