Hi,
On Tue, Sep 02, 2025 at 07:41:59AM +0000, Bertrand Drouvot wrote:
> On Tue, Sep 02, 2025 at 08:19:22AM +0900, Michael Paquier wrote:
> > Removing both the function calls and the extra counter incrementations
> > means to do the same thing as the WAL stats, where we have one
> > structure in charge of incrementing the counters, then the data diffs
> > are fed when flushing the entries in all the stats kinds. So this
> > would imply the introduction of an equivalent to WalUsage, but applied
> > to the IO stats, like a IOUsage, or something like that.
>
> Yeah, that sounds more complicated at first but I think that would solve
> the "ordering" issue mentioned above.
Attached is a draft version that implements an equivalent of WalUsage, that way:
- no ordering concerns anymore
- we can also get rid of PgStat_PendingIO ("replaced" by IOUsage)
- we can also get rid of PgStat_BackendPending (since both IO and WAL stats now
use the WAL's approach)
Regards,
--
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com