Re: Custom pgstat support performance regression for simple queries

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>
Cc: Andres Freund <andres(at)anarazel(dot)de>, pgsql-hackers(at)postgresql(dot)org, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Subject: Re: Custom pgstat support performance regression for simple queries
Date: 2025-07-27 23:18:01
Message-ID: aIazqVlgupWoJGX2@paquier.xyz
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Jul 25, 2025 at 08:57:29AM +0000, Bertrand Drouvot wrote:
> This was not needed before fc415edf8ca8, and I think it was better to use
> pgstat_have_pending_wal() to not have to set a flag to every places pgWalUsage.XX
> changes.

At the end, this cost makes the separation of the code layers a bit
better, by having pgstat.c not know about the specifics around the
fixed-numbered stats, so..

> Having said that, I think the single global flag patch is pretty straightforward
> and LGTM.

I have used that and applied it down to v18, closing the open item.
--
Michael

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Noah Misch 2025-07-27 23:56:28 Re: Non-text mode for pg_dumpall
Previous Message Sadeq Dousti 2025-07-27 23:15:44 Re: psql \dh: List High-Level (Root) Tables and Indexes