| From: | Amit Kapila <akapila(at)postgresql(dot)org> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: Avoid including worker_internal.h in pgstat.h. |
| Date: | 2026-02-20 04:01:48 |
| Message-ID: | E1vtHi8-000FIx-1I@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
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(at)anarazel(dot)de>
Author: Nisha Moond <nisha(dot)moond412(at)gmail(dot)com>
Reviewed-by: vignesh C <vignesh21(at)gmail(dot)com>
Reviewed-by: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Discussion: https://postgr.es/m/aY-UE-4t7FiYgH3t@alap3.anarazel.de
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/9842e8aca096d9b988a3ae924cdf4aa7e1bb2ea2
Modified Files
--------------
src/backend/commands/functioncmds.c | 1 +
src/backend/replication/logical/sequencesync.c | 3 +--
src/backend/replication/logical/tablesync.c | 3 +--
src/backend/replication/logical/worker.c | 6 ++----
src/backend/storage/ipc/procsignal.c | 1 +
src/backend/utils/activity/pgstat_subscription.c | 3 ++-
src/include/pgstat.h | 4 +---
src/include/replication/worker_internal.h | 7 +++++++
src/test/modules/test_custom_stats/test_custom_var_stats.c | 1 +
9 files changed, 17 insertions(+), 12 deletions(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Michael Paquier | 2026-02-20 07:30:22 | pgsql: Fix constant in error message for recovery_target_timeline |
| Previous Message | Nathan Bossart | 2026-02-19 22:20:28 | pgsql: Remove SpinLockFree() and S_LOCK_FREE(). |