Track IO times in pg_stat_io - Mailing list pgsql-hackers

From Melanie Plageman
Subject Track IO times in pg_stat_io
Date
Msg-id CAAKRu_ay5iKmnbXZ3DsauViF3eMxu4m1oNnJXqV_HyqYeg55Ww@mail.gmail.com
Whole thread Raw
Responses Re: Track IO times in pg_stat_io
List pgsql-hackers
Hi,

As suggested in [1], the attached patch adds IO times to pg_stat_io;

I added docs but haven't added any tests. The timings will only be
non-zero when track_io_timing is on, and I only see tests with track IO
timing on in explain.sql and the IO timings I added to pg_stat_io would
not be visible there.

I didn't split it up into two patches (one with the changes to track IO
timing and 1 with the view additions and docs), because I figured the
overall diff is pretty small.

There is one minor question (in the code as a TODO) which is whether or
not it is worth cross-checking that IO counts and times are either both
zero or neither zero in the validation function
pgstat_bktype_io_stats_valid().

- Melanie

[1] https://www.postgresql.org/message-id/20230209050319.chyyup4vtq4jzobq%40awork3.anarazel.de

Attachment

pgsql-hackers by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: Re: Give me more details of some bits in infomask!!
Next
From: "jacktby@gmail.com"
Date:
Subject: What's the prefix?