Re: [BUG]: the walsender does not update its IO statistics until it exits

Andres Freund <andres@anarazel.de>

From: Andres Freund <andres@anarazel.de>
To: Michael Paquier <michael@paquier.xyz>
Cc: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>, pgsql-hackers@lists.postgresql.org
Date: 2025-02-27T10:06:15Z
Lists: pgsql-hackers
On 2025-02-27 12:09:46 +0900, Michael Paquier wrote:
> I suspect that there would be cases where a single stats kind should be able
> to handle both transactional and non-transactional flush cases.  Splitting
> that across two stats kinds would lead to a lot of duplication.

Agreed. Table stats will be the prime case where that's important.



Commits

  1. Flush the IO statistics of active WAL senders more frequently

  2. Optimize check for pending backend IO stats