| From: | Nazir Bilal Yavuz <byavuz81(at)gmail(dot)com> |
|---|---|
| To: | Michael Paquier <michael(at)paquier(dot)xyz> |
| Cc: | Pavan <prampalli30(at)gmail(dot)com>, idrissaajalloh(at)gmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org |
| Subject: | Re: BUG #19953: pg_stat_io exposes impossible rows for io worker backends |
| Date: | 2026-12-04 11:06:42 |
| Message-ID: | CAN55FZ172EYL6hgp7fWJAOJ2qAH70QkE=J9rQ0LMM8uuMzG0sA@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-bugs |
Hi,
Thanks for notifying me!
On Fri, 4 Dec 2026 at 13:15, Michael Paquier <michael(at)paquier(dot)xyz> wrote:
>
> 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.
I found that this problem mentioned before [1].
> @@ -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.
Sorry, I didn't fully understand this. There isn't double counting if
I understood correctly. Instead, these stats are shown under the
backend that submits the IOs (client backend), and the IO worker stats
are 0, which is confusing.
> Still, isn't it also useful under some workloads to
> know how much the IO workers are doing?
Yes, I agree with you. In my opinion we should track these stats under
the IO workers instead of the backends that submit IOs. However, that
would be more complicated, and the current pg_stat_io -> io_worker
stats might be confusing. Perhaps, we can continue with the proposed
patch for now and then think about improving the statistics for io
workers later.
[1] https://postgr.es/m/flat/CA%2BxwDujmUnm_vbojvvRz87tuwTA90CZrC8HGor99Nv9RtJERRg%40mail.gmail.com
--
Regards,
Nazir Bilal Yavuz
Microsoft
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Shuntian Jiao | 2026-12-04 11:19:07 | Re: reltuples kept decreasing with each autovacuum run Re: BUG #18773 |
| Previous Message | Michael Paquier | 2026-12-04 10:15:08 | Re: BUG #19953: pg_stat_io exposes impossible rows for io worker backends |