On Wed, Aug 25, 2021 at 10:12:41AM +0900, Kyotaro Horiguchi wrote: > Yes, it can be called two or more times for a call to > pgstat_report_stat, but the patch causes only the first of them convey > effective connection stats numbers. This is the same way as how > transaction stats are treated. If no table activities have taken > place at all, pgStatXactCommit/Rollback are not consumed then the > following condition:
I was looking at this WIP patch, and plugging in the connection statistics to the table-access statistics looks like the wrong abstraction to me. I find much cleaner the approach of HEAD to use a separate API to report this information, as of pgstat_send_connstats(). As of the two problems discussed on this thread, aka the increased number of UDP packages and the extra timestamp computations, it seems to me that we had better combine the following ideas for HEAD and 14, for now: - Avoid the extra timestamp computation as proposed by Laurenz in [1] - Throttle the frequency where the connection stat packages are sent, as of [2]. Magnus, this open item is assigned to you as the committer of 960869d. Could you comment on those issues? [1]: https://www.postgresql.org/message-id/4095ceb328780d1bdba77ac6d9785fd7577ed047.ca...@cybertec.at [2]: https://www.postgresql.org/message-id/20210801205501.nyxzxoelqoo4x...@alap3.anarazel.de -- Michael
signature.asc
Description: PGP signature