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>, pgsql-hackers@postgresql.org, Alvaro Herrera <alvherre@kurilemu.de>, Michael Paquier <michael@paquier.xyz>
Date: 2026-02-19T06:16:03Z
Lists: pgsql-hackers
On Mon, Feb 16, 2026 at 1:18 PM Nisha Moond <nisha.moond412@gmail.com> wrote: > > On Sat, Feb 14, 2026 at 3:45 AM Andres Freund <andres@anarazel.de> wrote: > > > > > > conflict.h includes utils/timestamp.h, even though it only needs the > > types. Using datatype/timestamp.h suffices (although it requires some fixups > > elsewhere). > > > > It works even without including "utils/timestamp.h" in conflict.h, as > removing this header still allows the build and full tests to pass. > This is likely because the required definitions are included > indirectly, as all files using conflict.h already include either > "access/commit_ts.h" (which includes "datatype/timestamp.h") or > "datatype/timestamp.h" itself. > > To avoid possible issues in the future, if conflict.h is used in a > file that does not include timestamp.h, it would be safer to include > "datatype/timestamp.h" directly, which is sufficient and requires no > fixups elsewhere. > Yeah, that sounds better. > The attached patch includes the required change, and make check-world > passes cleanly for it. > Good. I have not tested it myself but if others don't see a problem with this, I can do the tests and push it. -- 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