Re: Make pg_stat_io view count IOs as bytes instead of blocks

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Nazir Bilal Yavuz <byavuz81@gmail.com>
Cc: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>, Melanie Plageman <melanieplageman@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-01-16T23:27:50Z
Lists: pgsql-hackers
On Thu, Jan 16, 2025 at 11:55:34AM +0300, Nazir Bilal Yavuz wrote:
> I checked clang 4 as well on the link you sent and it also fixes the
> warning there.

Confirmed here, so done this way.
--
Michael

Commits

  1. Rework macro pgstat_is_ioop_tracked_in_bytes()

  2. Remove assertion in pgstat_count_io_op()

  3. Make pg_stat_io count IOs as bytes instead of blocks for some operations

  4. Merge pgstat_count_io_op_n() and pgstat_count_io_op()