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

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Cc: vignesh C <vignesh21@gmail.com>, Xuneng Zhou <xunengzhou@gmail.com>, Andres Freund <andres@anarazel.de>, pgsql-hackers@lists.postgresql.org
Date: 2025-04-07T23:00:48Z
Lists: pgsql-hackers
On Mon, Apr 07, 2025 at 07:13:20AM +0000, Bertrand Drouvot wrote:
> As we now have 2 code paths I think we "really" need 2 tests. The attached
> (to apply on top of v7) seems to do the job.

Confirmed.  I am sold on this extra location on HEAD, and it does not
impact the run time of the test as there is enough activity happening
between the resets and the poll check.  So, done down to v16.
--
Michael

Commits

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

  2. Optimize check for pending backend IO stats