> FWIW, I am not convinced that the gain in coverage is worth the cycles > on this one. This is only one WARNING with many more patterns to > check how pgstat_read_statsfile() is robust with changes in > shared_preload_libraries and reuses of the same IDs.
I agree, I included the test mainly because it's an easy reproducer for the issue, otherwise it's very specific. I only kept it as a single patch because the entire thing is small and it is easy to separate the pgstat.c changes from it.
