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

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>
Cc: Nazir Bilal Yavuz <byavuz81(at)gmail(dot)com>, Melanie Plageman <melanieplageman(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Make pg_stat_io view count IOs as bytes instead of blocks
Date: 2025-01-14 03:18:23
Message-ID: Z4XXf2CWul4kvFbj@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Jan 10, 2025 at 08:23:46AM +0000, Bertrand Drouvot wrote:
> On Fri, Jan 10, 2025 at 10:15:52AM +0300, Nazir Bilal Yavuz wrote:
>> But I agree that having a macro has more benefits,
>> also there already is a check for the 'io_op < IOOP_NUM_TYPES' in the
>> pgstat_count_io_op() function.
>
> Yeah, I think we can remove the "io_op < IOOP_NUM_TYPE" assertion in
> pgstat_count_io_op() (but keep this check as part of the macro).
>
> Appart from the above, LGTM.

Okay, so applied.

And I've somewhat managed to fat-finger the business with
pgstat_count_io_op() with an incorrect rebase. Will remove in a
minute..
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2025-01-14 03:54:36 Re: WAL-logging facility for pgstats kinds
Previous Message David G. Johnston 2025-01-14 03:13:39 Docs for pg_basebackup needs v17 note for incremental backup