Rework macro pgstat_is_ioop_tracked_in_bytes()

Michael Paquier <michael@paquier.xyz>

Commit: 7b6468cc9523d7d923487d212281af51f7f3dae2
Author: Michael Paquier <michael@paquier.xyz>
Date: 2025-01-16T23:26:17Z
Releases: 18.0
Rework macro pgstat_is_ioop_tracked_in_bytes()

As written, it was triggering a compilation warning for old versions of
clang, as reported by buildfarm members ayu, batfish and demoiselle.
Forcing a cast with "unsigned int" should fix the warning.

While on it, the macro is moved to pgstat.h, closer to the declaration
of IOOp, per suggestion from Tom Lane.

Reported-by: Tom Lane
Reviewed-by: Bertrand Drouvot, Tom Lane, Nazir Bilal Yavuz
Discussion: https://postgr.es/m/1272824.1736961543@sss.pgh.pa.us

Files

PathChange+/−
src/backend/utils/activity/pgstat_io.c modified +0 −8
src/include/pgstat.h modified +4 −0

Discussion