From: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
---|---|
To: | Adam Brightwell <adam(dot)brightwell(at)crunchydatasolutions(dot)com> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Unnecessary #include in objectaddress.h? |
Date: | 2015-07-20 22:10:48 |
Message-ID: | 20150720221048.GV2301@postgresql.org |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Adam Brightwell wrote:
> All,
>
> While looking at the include dependency graph for objectaddress.h:
>
> http://doxygen.postgresql.org/objectaddress_8h.html
>
> I saw that pg_list.h is both included and inherited (through multiple
> paths) by objectaddress.h. Perhaps this doesn't matter, but I thought
> I would at least bring it up and propose removing this redundant
> #include from objectaddress.h.
I wondered whether to bother about this kind of thing for a while. It
doesn't have any practical impact immediately, because obviously
pg_list.h is still included indirectly by objectaddress.h (via lock.h in
this case IIRC). If we made some restructuring that caused the other
header not to include pg_list.h anymore, that would make objectaddress.h
broken -- unless objectaddress.h itself no longer needed pg_list.h.
We've had in previous rounds whole iterations on a "pgrminclude" script
that does this kind of thing, but the breakage after each such run is
large.
All in all, I wouldn't bother unless there is an actual change.
--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Adam Brightwell | 2015-07-20 23:01:14 | Re: security labels on databases are bad for dump & restore |
Previous Message | Tom Lane | 2015-07-20 21:17:34 | Re: "make check" changes have caused buildfarm deterioration. |