On Mon, Nov 09, 2026 at 09:16:39AM +0000, Bertrand Drouvot wrote: > As a result, 0003-0005 no longer add direct WAL, lock and I/O accumulation > calls. > 0006 also renames pgstat_per_backend.c to pgstat_backend.c after removing the > existing PGSTAT_KIND_BACKEND implementation. > > Also, as mentioned up-thread, support for custom per-backend statistics is > left > for a follow-up.
Looked at 0001, to start with something. +# a shared WAL reset should set the reset timestamp for live backends +permutation s1_reset_shared s1_check_reset This is the last permutation of the isolation test, and as far as I can see this is not really valid when taken in isolation. The expected state of s1_check_reset comes from the previous step, actually, due to the connections being opened once. So I've removed this part and the step s1_reset_shared. Permutation 4 looks OK, though, with the per-backend reset. If you have more ideas that could be added here, feel free, just checking that the reset timestamp is updated once is sufficient to me. +# Resetting s2's stats resets its timestamp. +permutation s1_reset_backend s1_check_reset This one now uses an extra s1_check_reset before the s1_reset_backend, so as we check that nothing in the test has the idea to kick a timestamp reset beforehand. Your test was slightly weaker written as-is. Not sure that I like much the placement of the TAP test in 029_stats_restart.pl, which has nothing to do about snapshot consistency. I see why you are using TAP, of course, as you want to check that backends are excluded when these connect to the server after a snapshot has been built. The tool is right, the location is not. Perhaps something like test_misc, in a manner similar to the lock stats, would be better? The regression test is fine. I have tweaked a few more things in the isolation test (name, comment simplifications and additions), and applied the result as it is already a nice cut. Nice coverage additions! That's one less patch to worry about, at least a good chunk of it. -- Michael
signature.asc
Description: PGP signature
