On Fri, 2021-08-27 at 13:57 +0900, Michael Paquier wrote: > > I think in that case we'd have to do the bigger redesign and move "live" > > connection stats to backend_status.c... > > Hmm. A redesign is not really an option for 14 at this stage. And I > am not really comfortable with the latest proposal from upthread to > plug in that to pgstat_send_tabstat to report things once per > transaction, either. It really looks like this needs more thoughts, > and it would mean that a revert may be the most appropriate choice > for the moment. That's the last-resort option, surely, but we are > post-beta3 so there is no much margin left.
In the view of that, how about doubling PGSTAT_STAT_INTERVAL to 1000 milliseconds? That would mean slightly less up-to-date statistics, but I doubt that that will be a problem. And it should even out the increase in statistics messages, except in the case of lots of short-lived sessions. But in that scenario you cannot have session statistics without lots of extra messages, and such a workload has enough performance problems as it is, so I don't think we have to specifically worry about it. Yours, Laurenz Albe