Re: Make pg_stat_io view count IOs as bytes instead of blocks
Nazir Bilal Yavuz <byavuz81@gmail.com>
From: Nazir Bilal Yavuz <byavuz81@gmail.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>, Melanie Plageman <melanieplageman@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-01-09T11:20:16Z
Lists: pgsql-hackers
Attachments
- v7-0001-Make-pg_stat_io-count-IOs-as-bytes-instead-of-blo.patch (text/x-patch) patch v7-0001
- v7-0002-Replace-pgstat_count_io_op-with-pgstat_count_io_o.patch (text/x-patch) patch v7-0002
Hi, On Thu, 9 Jan 2025 at 11:11, Michael Paquier <michael@paquier.xyz> wrote: > > On Thu, Jan 09, 2025 at 10:15:20AM +0300, Nazir Bilal Yavuz wrote: > > I am a bit confused, are you suggesting these two alternatives: > > 1- Making pgstat_count_io_op_n() static and continuing to use > > pgstat_count_io_op() as it is. > > 2- Removing pgstat_count_io_op() and instead using > > pgstat_count_io_op_n() everywhere. > > Either of these options is OK by me. The current state of things just > seems a bit strange because we publish a routine that's used nowhere. > If you have plans for it in a different patch, that's also fine. I followed the second option as it is similar to pgstat_count_io_op_time() and also more future proof. I attached it as another patch. v7 is attached. -- Regards, Nazir Bilal Yavuz Microsoft
Commits
-
Rework macro pgstat_is_ioop_tracked_in_bytes()
- 7b6468cc9523 18.0 landed
-
Remove assertion in pgstat_count_io_op()
- d2181b321852 18.0 landed
-
Make pg_stat_io count IOs as bytes instead of blocks for some operations
- f92c854cf406 18.0 landed
-
Merge pgstat_count_io_op_n() and pgstat_count_io_op()
- f0bf7857befe 18.0 landed