Re: Remove io prefix from pg_stat_io columns

From: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
To: michael(at)paquier(dot)xyz
Cc: melanieplageman(at)gmail(dot)com, fabriziomello(at)gmail(dot)com, pgsql-hackers(at)postgresql(dot)org, andres(at)anarazel(dot)de
Subject: Re: Remove io prefix from pg_stat_io columns
Date: 2023-04-20 04:24:02
Message-ID: 20230420.132402.1792288812834428815.horikyota.ntt@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

At Thu, 20 Apr 2023 10:13:04 +0900, Michael Paquier <michael(at)paquier(dot)xyz> wrote in
> On Wed, Apr 19, 2023 at 08:50:13PM -0400, Melanie Plageman wrote:
> > I thought about changing parameter and local variable names to remove
> > the prefix, but in the original discussion folks seemed to think it made
> > sense to leave the "C level" references with an "io" prefix. I think we
> > could change many of them, but some of them may be required for clarity.
>
> I agree with the feeling of not touching the internal variables. It
> makes them easier to grep, and it seems that these are mostly on lines
> where there is little context about what they refer to..

I find the names for local loop variables are a bit annoying, but I
don't feel strongly about removing the prifix there. I'm also not in
favor of removing the prefix in other cases, bacause it helps with
grep'ability.

> if (backend_io->times[io_object][io_context][io_op] != 0 &&
> backend_io->counts[io_object][io_context][io_op] <= 0)

> Perhaps others have comments or objections, so let's wait a bit, but
> I'd be OK to apply this one myself, with a catversion bump. (Happy to
> help.)

So, I don't have any issues with the patch overall. From what I can
tell, there are no remaining instances of io_foobar that need to be
rewritten.

regards.

--
Kyotaro Horiguchi
NTT Open Source Software Center

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Kyotaro Horiguchi 2023-04-20 04:30:16 Re: eclg -C ORACLE breaks data
Previous Message Michael Paquier 2023-04-20 04:00:52 Re: eclg -C ORACLE breaks data