Re: Removal of useless include references

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Removal of useless include references
Date: 2011-09-01 14:04:33
Message-ID: 201109011404.p81E4X314464@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Bruce Momjian wrote:
> Bruce Momjian wrote:
> > Tom Lane wrote:
> > > Bruce Momjian <bruce(at)momjian(dot)us> writes:
> > > > It has been years since I ran src/tools/pginclude/pgrminclude to remove
> > > > unnecessary include files. (I have already fixed things so include
> > > > files can be compiled on their own.)
> > >
> > > > The attached patch removes unneeded include references, and marks some
> > > > includes as needing to be skipped by pgrminclude.
> > >
> > > > I am sure applying this patch will break builds on some platforms and
> > > > some option combinations so I will monitor the buildfarm when I apply it
> > > > and make adjustments.
> > >
> > > The last time you did this was in July 2006. It took us two weeks to
> > > mostly recover, but we were still dealing with some fallout in December,
> > > cf
> > > http://archives.postgresql.org/pgsql-hackers/2006-12/msg00491.php
> > >
> > > We had the buildfarm then, had had it for a couple years. The notion
> > > that watching the buildfarm is enough is fully disproven by history.
> > >
> > > Unless you have a better test plan than last time (which this isn't),
> > > I don't think this should be done at all. The benefits are microscopic
> > > and the pain real.
> >
> > I don't have a better plan. There are #ifdef code blocks that often
> > don't get processed and therefore this can't be done better. I will
> > abandon the idea.
>
> OK, try #2. I already had code that removed #if/#else/#endif code in
> *.h files for better testing, so I extended that to all *.c files. This
> reduces the size of the diff from 6.6k lines to 4.7k lines but it makes
> it much less likely that there will be problems from running
> pgrminclude.
>
> The current patch is here:
>
> http://momjian.us/expire/pgrminclude.diff
>
> I tested the patch on BSD and Linux.

I have re-run the script and applied the result, again tested on BSD and
Linux. I will monitor the buildfarm for possible failures.

This is not something we are going to do regularly, but probably every
five years like this time.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ It's impossible for everything to be true. +

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2011-09-01 14:10:12 Re: pgsql: Remove "fmgr.h" include in cube contrib --- caused crash on a Ge
Previous Message Robert Haas 2011-09-01 13:25:44 Re: mb_regress.sh gripes