Re: Fix cumulative WAL statistics double-counting from parallel workers

From: Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>
To: Lukas Fittl <lukas(at)fittl(dot)com>
Cc: shihao zhong <zhong950419(at)gmail(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, Andres Freund <andres(at)anarazel(dot)de>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Ahmed Gouda <gouda0x(at)gmail(dot)com>, Bernd Reiß <bd_reiss(at)gmx(dot)at>
Subject: Re: Fix cumulative WAL statistics double-counting from parallel workers
Date: 2026-11-12 06:53:44
Message-ID: avVieHO0QJxckw3i@bdtpg
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On Tue, Nov 10, 2026 at 02:47:56PM -0800, Lukas Fittl wrote:
> I'm leaning towards Bertrand's point to leave this as is, so we match
> what the documentation already says, and clarify in the commit
> message.

Thanks for confirming, and it's also consistent with the per bakend IO and Lock
stats.

> In the future we could invent a mechanism to get aggregated parallel
> worker activity for a given leader PID in a separate statistics kind.

Yeah, that would be a good addition. I haven't thought about it in detail, so
I'm not sure that a separate statistics kind would be the way to go, though.

Regards,

--
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jim Jones 2026-11-12 07:14:51 Re: CREATE TABLE .. LIKE copies comments to an unrelated table
Previous Message vignesh C 2026-11-12 06:39:15 Re: Hash index: stop registering pin-only bucket pages in WAL (remove REGBUF_NO_CHANGE)