On Fri, Dec 06, 2024 at 12:41:55PM +0300, Nazir Bilal Yavuz wrote: > Thanks! I think 'track' is a better word in this context. I used > 'tracked in ...', as it sounded more correct to me (I hope it is).
Splitting op_bytes into three fields sounds like a good idea. Count me in regarding the concept to depend less on BLCKSZ. typedef enum IOOp { + /* IOs not tracked in bytes */ IOOP_EVICT, - IOOP_EXTEND, IOOP_FSYNC, IOOP_HIT, - IOOP_READ, IOOP_REUSE, - IOOP_WRITE, IOOP_WRITEBACK, + + /* IOs tracked in bytes */ + IOOP_EXTEND, + IOOP_READ, + IOOP_WRITE, } IOOp; pg_stat_io_build_tuples() is now the code path taken when building the tuples returned by pg_stat_io, meaning that the new function called pg_stat_get_backend_io() is also going to need an update in its list of output parameters to accomodate with what you are changing here. Calling your new pgstat_get_io_byte_index() in the new refactored routine is also necessary. Sorry about that. Could you send a rebase, please? I can promise to review this thread's new patch, as that will also move the needle regarding your work with pg_stat_io to track WAL activity. -- Michael
signature.asc
Description: PGP signature