]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Avoid including worker_internal.h in pgstat.h.
authorAmit Kapila <akapila@postgresql.org>
Fri, 20 Feb 2026 03:56:33 +0000 (09:26 +0530)
committerAmit Kapila <akapila@postgresql.org>
Fri, 20 Feb 2026 03:56:33 +0000 (09:26 +0530)
commit9842e8aca096d9b988a3ae924cdf4aa7e1bb2ea2
tree1ea52668f03253f3754ce9fcef45d6983052bf0a
parentba401828c194c17031a6a2dedd97bc0defd80d4b
Avoid including worker_internal.h in pgstat.h.

pgstat.h is a widely included header. Including worker_internal.h there is
unnecessary and creates tight coupling. By refactoring
pgstat_report_subscription_error() to fetch the required
LogicalRepWorkerType internally rather than receiving it as an argument,
we can eliminate the need for the internal header.

Reported-by: Andres Freund <andres@anarazel.de>
Author: Nisha Moond <nisha.moond412@gmail.com>
Reviewed-by: vignesh C <vignesh21@gmail.com>
Reviewed-by: Amit Kapila <amit.kapila16@gmail.com>
Discussion: https://postgr.es/m/aY-UE-4t7FiYgH3t@alap3.anarazel.de
src/backend/commands/functioncmds.c
src/backend/replication/logical/sequencesync.c
src/backend/replication/logical/tablesync.c
src/backend/replication/logical/worker.c
src/backend/storage/ipc/procsignal.c
src/backend/utils/activity/pgstat_subscription.c
src/include/pgstat.h
src/include/replication/worker_internal.h
src/test/modules/test_custom_stats/test_custom_var_stats.c