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>, 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: | 2024-12-18 04:57:53 |
Message-ID: | Z2JWUaY8AHBs99yp@paquier.xyz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Dec 17, 2024 at 09:35:37AM +0000, Bertrand Drouvot wrote:
> Agree, we may need to add parameters to it but we'll see when the time comes.
Another thing that's been itching me: the loop in
pg_stat_get_backend_io() that exists as well in pg_stat_get_io() looks
worth refactoring in a single routine. The only difference between
both is the reset timestamp, still both of them can pass a value for
it depending on their stats kind entry. This shaves a bit more code
in your own patch, even if the check on pgstat_tracks_io_bktype() and
the Assert are not in the inner routine that fills the tuplestore with
the I/O data. See pg_stat_fill_io_data() in v10-0002. If you have a
better name for this routine, feel free..
What do you think about this refactoring? This should come in first,
of course, so as the final patch introducing the backend stats is
easier to parse.
--
Michael
Attachment | Content-Type | Size |
---|---|---|
v10-0001-per-backend-I-O-statistics.patch | text/x-diff | 36.5 KB |
v10-0002-Tweaks-on-top-of-v9.patch | text/x-diff | 21.6 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Smith | 2024-12-18 06:09:48 | Re: Logical Replication of sequences |
Previous Message | Ashutosh Bapat | 2024-12-18 04:20:01 | Re: [Feature Request] Schema Aliases and Versioned Schemas |