Re: BUG #19953: pg_stat_io exposes impossible rows for io worker backends

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Pavan <prampalli30(at)gmail(dot)com>
Cc: idrissaajalloh(at)gmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org, Nazir Bilal Yavuz <byavuz81(at)gmail(dot)com>
Subject: Re: BUG #19953: pg_stat_io exposes impossible rows for io worker backends
Date: 2026-12-04 10:15:08
Message-ID: axKSrFAMNs2j0dAc@paquier.xyz
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Wed, Dec 02, 2026 at 09:19:33PM +0530, Pavan wrote:
> The attached patch moves B_IO_WORKER to the return-false branch in
> pgstat_tracks_io_bktype(), updates the header comment to match, and
> removes the 8 io worker rows from expected/stats.out.

@@ -351,6 +353,7 @@ pgstat_tracks_io_bktype(BackendType bktype)
case B_INVALID:
case B_DEAD_END_BACKEND:
case B_ARCHIVER:
+ case B_IO_WORKER:
case B_LOGGER:
return false;

@@ -362,7 +365,6 @@ pgstat_tracks_io_bktype(BackendType bktype)
case B_BG_WORKER:
case B_BG_WRITER:
case B_CHECKPOINTER:
- case B_IO_WORKER:
case B_SLOTSYNC_WORKER:
case B_STANDALONE_BACKEND:
case B_STARTUP:

Ah, so that's what you were looking for here, to avoid
double-counting. Still, isn't it also useful under some workloads to
know how much the IO workers are doing?

Adding Nazir in CC for comments, as I am sure to miss something on
this Friday evening.
--
Michael

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Nazir Bilal Yavuz 2026-12-04 11:06:42 Re: BUG #19953: pg_stat_io exposes impossible rows for io worker backends
Previous Message ZhangChi 2026-12-04 08:58:46 Re: BUG #19977: constraint_exclusion Silently Returns 0 Rows on Subpartitioned Table