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

From: Nazir Bilal Yavuz <byavuz81(at)gmail(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Bertrand Drouvot <bertranddrouvot(dot)pg(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-09 11:20:16
Message-ID: CAN55FZ32ze812=yjyZg1QeXhKvACUM_Nu0_gyPQcUKKuVHL5xA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On Thu, 9 Jan 2025 at 11:11, Michael Paquier <michael(at)paquier(dot)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

Attachment Content-Type Size
v7-0001-Make-pg_stat_io-count-IOs-as-bytes-instead-of-blo.patch text/x-patch 23.8 KB
v7-0002-Replace-pgstat_count_io_op-with-pgstat_count_io_o.patch text/x-patch 3.5 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Devanga.Susmitha@fujitsu.com 2025-01-09 11:22:05 [PATCH] Hex-coding optimizations using SVE on ARM.
Previous Message Vladlen Popolitov 2025-01-09 11:13:11 Re: Exporting float_to_shortest_decimal_buf(n) with Postgres 17 on Windows