Re: pgstat include expansion
Amit Kapila <amit.kapila16@gmail.com>
From: Amit Kapila <amit.kapila16@gmail.com>
To: Nisha Moond <nisha.moond412@gmail.com>
Cc: Andres Freund <andres@anarazel.de>, Alvaro Herrera <alvherre@kurilemu.de>, Chao Li <li.evan.chao@gmail.com>, pgsql-hackers@postgresql.org, Michael Paquier <michael@paquier.xyz>
Date: 2026-02-19T04:46:45Z
Lists: 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.
Commits
-
Don't include wait_event.h in pgstat.h
- 868825aaeb40 19 (unreleased) landed
-
Don't include proc.h in shm_mq.h
- a2c89835f512 19 (unreleased) landed
-
Don't include latch.h in libpq/libpq.h
- 7b9b620d8fc7 19 (unreleased) landed
-
Reduce includes in pgstat.h
- 7bb50dd7d6b9 19 (unreleased) landed
-
Avoid including utils/timestamp.h in conflict.h.
- 308622edf174 19 (unreleased) landed
-
Avoid including worker_internal.h in pgstat.h.
- 9842e8aca096 19 (unreleased) landed
-
Add seq_sync_error_count to subscription statistics.
- f6a4c498dcf6 19 (unreleased) cited
-
Don't include execnodes.h in replication/conflict.h
- 7e638d7f5093 19 (unreleased) cited
-
Collect statistics about conflicts in logical replication.
- 6c2b5edecc0d 18.0 cited