Count write times when extending relation files for shared buffers
Michael Paquier <michael@paquier.xyz>
Count write times when extending relation files for shared buffers Relation files extended multiple blocks at a time have been counting the number of blocks written, but forgot that to increment the write time in this case, as write and relation extension are treated as two different I/O operations in the shared stats: IOOP_EXTEND vs IOOP_WRITE. In this case IOOP_EXTEND was forgotten for normal (non-temporary) relations. Write times are tracked when track_io_timing is enabled, which is not the case by default. Author: Nazir Bilal Yavuz Reviewed-by: Robert Haas, Melanie Plageman Discussion: https://postgr.es/m/CAN55FZ19Ss279mZuqGbuUNxka0iPbLgYuOQXqAKewrjNrp27VA@mail.gmail.com Backpatch-through: 16
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/utils/activity/pgstat_io.c | modified | +1 −1 |
Discussion
- pgBufferUsage.blk_{read|write}_time are zero although there are pgBufferUsage.local_blks_{read|written} 20 messages · 2023-09-15 → 2023-12-15