Re: Track IO times in pg_stat_io

Bertrand Drouvot <bertranddrouvot.pg@gmail.com>

From: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
To: Andres Freund <andres@anarazel.de>
Cc: Melanie Plageman <melanieplageman@gmail.com>, Pg Hackers <pgsql-hackers@postgresql.org>, Maciek Sakrejda <m.sakrejda@gmail.com>, Justin Pryzby <pryzby@telsasoft.com>, smilingsamay@gmail.com, Kyotaro Horiguchi <horikyota.ntt@gmail.com>, Lukas Fittl <lukas@fittl.com>, Magnus Hagander <magnus@hagander.net>, Alvaro Herrera <alvherre@alvh.no-ip.org>
Date: 2024-08-23T07:32:16Z
Lists: pgsql-hackers
Hi,

On Wed, Mar 08, 2023 at 04:34:38PM -0800, Andres Freund wrote:
> On 2023-03-08 12:55:34 +0100, Drouvot, Bertrand wrote:
> > - pg_stat_io is "global" across all sessions. So, even if one session is doing some "testing" and needs to turn track_io_timing on, then it
> > is even not sure it's only reflecting its own testing (as other sessions may have turned it on too).
> 
> I think for 17 we should provide access to per-existing-connection pg_stat_io
> stats, and also provide a database aggregated version. Neither should be
> particularly hard.

FWIW, I think that would be great and plan to have a look at this (unless someone
beats me to it).

Regards,

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



Commits

  1. Improve IO accounting for temp relation writes