Re: pgstat include expansion
Álvaro Herrera <alvherre@kurilemu.de>
From: Alvaro Herrera <alvherre@kurilemu.de>
To: Amit Kapila <amit.kapila16@gmail.com>
Cc: Chao Li <li.evan.chao@gmail.com>, Andres Freund <andres@anarazel.de>, pgsql-hackers@postgresql.org, Michael Paquier <michael@paquier.xyz>
Date: 2026-02-16T16:32:27Z
Lists: pgsql-hackers
On 2026-Feb-16, Amit Kapila wrote: > How about moving LogicalRepWorkerType to logicalworker.h as in the > attached and then include that in pgstat.h? This requires few other > adjustments as previously some of the includes were working indirectly > via worker_internal.h. Yeah, I think the inclusion of worker_internal.h in pgstat.h is catastrophic, and the additions of .h files that you propose to fix them after the removal look OK to me, though I didn't try to compile or run headerscheck, though you should before pushing. I'm not sure about including logicalworker.h in pgstat.h though, given the prototypes you have there ... the logical worker type enum does not fit together with those IMO. Maybe it'd be better to add a new file for pgstat_subscription.c and pgstat.h to use, where this enum lives. (Maybe something like src/include/replication/pgstat_worker.h or src/include/replication/worker_stat.h ?) -- Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/ "La espina, desde que nace, ya pincha" (Proverbio africano)
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