Re: per backend I/O statistics

From: Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Andres Freund <andres(at)anarazel(dot)de>, Nazir Bilal Yavuz <byavuz81(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: per backend I/O statistics
Date: 2025-01-20 13:26:55
Message-ID: Z45PH8ktqncFi8+V@ip-10-97-1-34.eu-west-3.compute.internal
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On Mon, Jan 20, 2025 at 09:11:16PM +0900, Michael Paquier wrote:
> On Mon, Jan 20, 2025 at 11:10:40AM +0000, Bertrand Drouvot wrote:
> > I think that it would be better to make the distinction based on "local/static"
> > vs "dynamic memory" pending stats instead: I did so in v3 attached, using:
> >
> > .flush_dynamic_cb(): flushes pending entries tracked in dynamic memory
> > .flush_static_cb(): flushes pending stats from static/global variable
>
> "static" and "dynamic" feel a bit off when used together. For
> "static", the stats are from a static state but they can be pushed to
> the dshash, as well, which is in dynamic shared memory.

Right, that's another way to find it confusing ;-). But if we keep focus
on where the pending stats are stored, it is not.

> Hmm. Thinking more about that, I think that we should leave the
> existing "flush_pending_cb" alone. For the two others, how about
> "have_static_pending_cb" and "flush_static_cb" rather than "fixed"?
> It seems important to me to show the relationship between these two.

Yeah, that works for me: done in v4 attached.

Regards,

--
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com

Attachment Content-Type Size
v4-0001-Rework-per-backend-pending-stats.patch text/x-diff 18.2 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Maiquel Grassi 2025-01-20 13:34:22 Re: Psql meta-command conninfo+
Previous Message Srinath Reddy 2025-01-20 13:15:43 Re: [PATCH] immediately kill psql process if server is not running.