Hi hackers,
This patch removes the functions that are incrementing the backend IO stats.
Instead, it now copies the IO pending stats to the backend IO pending stats when
the pending IO stats are flushed. This behaves the same way as for some relation
and database stats (see pgstat_relation_flush_cb()).
It's done that way to avoid incrementing the "same" counters twice as it produces
increased overhead in profiles (reported by Andres in [1]).
Please note that per-backend statistics have to be last when we define the
PGSTAT_KIND_% values in pgstat_kind.h, as some of their pending stats are
populated while other stats kinds are flushing.
[1]: https://www.postgresql.org/message-id/7fhpds4xqk6bnudzmzkqi33pinsxammpljwde5gfkjdygvejrj%40ojkzfr7dxkmm
Regards,
--
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com