On Wed, Dec 18, 2024 at 08:11:55AM +0000, Bertrand Drouvot wrote: > I think I prefer pg_stat_io_build_tuples() and used that name in v11 > attached.
I'll rely to your naming sense than mine, then :D > I think that this comment is now confusing since the extra loop would be > done in pg_stat_io_build_tuples() and not where the comment is written. One > option could have been to move the assert and the comment in > pg_stat_io_build_tuples() > but I think it's better to have the assert before the > pgstat_tracks_io_bktype() > call in pg_stat_get_io(), so modified the comment a bit instead. > > 0002 is the per-backend stats I/O with yours tweaks. While doing more tests with backends exiting concurrently with their stats scanned, I have detected one path in pg_stat_get_backend_io() after calling pgstat_get_beentry_by_proc_number() where we should also check that it does not return NULL, or we would crash on a pointer dereference when reading the backend type. Fixed that, bumped the two version counters, and done. -- Michael
signature.asc
Description: PGP signature