Re: pgstat include expansion - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: pgstat include expansion
Date
Msg-id CAA4eK1+R_f+E5kQR3-fn5ErUmS3r2++sw+YwvVMqPvHnSX8x+w@mail.gmail.com
Whole thread Raw
In response to Re: pgstat include expansion  (Nisha Moond <nisha.moond412@gmail.com>)
List pgsql-hackers
On Wed, Feb 18, 2026 at 10:09 AM Nisha Moond <nisha.moond412@gmail.com> wrote:
>
> On Tue, Feb 17, 2026 at 4:44 PM Amit Kapila <amit.kapila16@gmail.com> wrote:
> >
> > As the worker type is not directly available in all places, the other
> > possibility is to expose a function like GetLogicalWorkerType from
> > worker_internal.h and use it directly in
> > pgstat_report_subscription_error() instead of passing it via
> > parameter. We can get the worker_type via MyLogicalRepWorker->type
> > which should be accessible as it will be invoked by one of the logical
> > replication workers.
> >
> +1
> This seems like a cleaner approach than adding multiple worker
> specific checks and functions.
> Here is a patch that implements this idea.
>

LGTM. I'll push this tomorrow unless there are comments/objections on
this patch.

--
With Regards,
Amit Kapila.



pgsql-hackers by date:

Previous
From: Shlok Kyal
Date:
Subject: Re: Skipping schema changes in publication
Next
From: Tatsuo Ishii
Date:
Subject: Re: Row pattern recognition