| From: | Alvaro Herrera <alvherre(at)kurilemu(dot)de> |
|---|---|
| To: | Andres Freund <andres(at)anarazel(dot)de> |
| Cc: | Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, pgsql-hackers(at)postgresql(dot)org, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz> |
| Subject: | Re: pgstat include expansion |
| Date: | 2026-02-27 10:37:31 |
| Message-ID: | 202602271034.lgsu7hqnmc5p@alvherre.pgsql |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi,
On 2026-Feb-26, Andres Freund wrote:
> FWIW, regardless of what we choose here (i.e. whether and where to
> "unnecessarily" include wait_event.h), I'd be in favor of fixing all the
> fallout in our source tree, just for cleanliness' sake. It's also presumably
> the part of the patch that would be the most pain to keep updated.
Oh, that makes sense.
> I'm not sure that including in latch.h really would an improvement though -
> that's included in proc.h and libpq.h, which both are fairly widely included
> [1].
I have committed fixes for both of those, so that including an extra
file in latch.h is not as bad.
Here's one more patch. I noticed that the call actually uses
PG_WAIT_EXTENSION, which is in storage/wait_classes.h. Including that
seems a bit narrow-minded even if it's just for backwards compatibility,
so I decided to do wait_event_types.h instead. This is still a bit
better than the whole wait_event.h IMO. And also now it's IWYU: export
rather than IWYU: keep, which seems sensible.
--
Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/
"El miedo atento y previsor es la madre de la seguridad" (E. Burke)
| Attachment | Content-Type | Size |
|---|---|---|
| 0001-Don-t-include-wait_event.h-in-pgstat.h.patch | text/x-diff | 37.1 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Soumya S Murali | 2026-02-27 10:45:33 | Re: support create index on virtual generated column. |
| Previous Message | Fujii Masao | 2026-02-27 10:36:19 | Re: Show comments in \dRp+, \dRs+, and \dX+ psql meta-commands |