Re: question about pending updates in pgstat_report_inj

From: Sami Imseih <samimseih(at)gmail(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Andres Freund <andres(at)anarazel(dot)de>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: question about pending updates in pgstat_report_inj
Date: 2025-09-16 19:19:05
Message-ID: CAA5RZ0u+5Rh7tMWOQv=krPKyQ=SFoOk44q68W5knK-d=qE2Rhg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On Mon, Sep 15, 2025 at 05:33:45PM -0500, Sami Imseih wrote:
> > I think it's better to use ->pending here, since this is referenced
> > as an example and most real-world cases will likely want to use
> > ->pending for performance reasons.
>
> Yes, it should use the pending entry. b757abefc041 did not get that
> completely right.
>
> The purpose of this code is also to serve as a template, so better
> that it does the correct thing.
>
> How about renaming "statent" to "pending" in pgstat_report_inj(), as
> well? That would be a bit more consistent with the subscription stat
> case, at least.

0001 LGTM.

--
Sami

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Nathan Bossart 2025-09-16 19:35:55 Re: GetNamedLWLockTranche crashes on Windows in normal backend
Previous Message Jacob Champion 2025-09-16 19:16:58 Re: OAuth client code doesn't work with Google OAuth