Re: Make pg_stat_io view count IOs as bytes instead of blocks
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Michael Paquier <michael@paquier.xyz>
Cc: Nazir Bilal Yavuz <byavuz81@gmail.com>,
Bertrand Drouvot <bertranddrouvot.pg@gmail.com>,
Melanie Plageman <melanieplageman@gmail.com>,
PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-01-16T05:18:38Z
Lists: pgsql-hackers
Michael Paquier <michael@paquier.xyz> writes: > Just for an assert, I would just remove the macro rather than have an > inline function. Oh, I'd not noticed that there is only one caller. However, the macro does provide a convenient place to hang the warning comment about keeping it sync'd with the enum. Personally I'd keep the macro but move it to pgstat.h, close to the enum declaration, so that there's more than epsilon chance of someone who's changing the enum noticing they need to update it. regards, tom lane
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