Skip site navigation (1) Skip section navigation (2)

pgsql: Clean up the #include mess a little.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Clean up the #include mess a little.
Date: 2011-09-04 05:13:41
Message-ID: E1R051Z-0005at-Au@gemulon.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committerspgsql-hackers
Clean up the #include mess a little.

walsender.h should depend on xlog.h, not vice versa.  (Actually, the
inclusion was circular until a couple hours ago, which was even sillier;
but Bruce broke it in the expedient rather than logically correct
direction.)  Because of that poor decision, plus blind application of
pgrminclude, we had a situation where half the system was depending on
xlog.h to include such unrelated stuff as array.h and guc.h.  Clean up
the header inclusion, and manually revert a lot of what pgrminclude had
done so things build again.

This episode reinforces my feeling that pgrminclude should not be run
without adult supervision.  Inclusion changes in header files in particular
need to be reviewed with great care.  More generally, it'd be good if we
had a clearer notion of module layering to dictate which headers can sanely
include which others ... but that's a big task for another day.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/1609797c25f6b440371045039733d69fe8cb9410

Modified Files
--------------
contrib/auto_explain/auto_explain.c             |    1 +
contrib/cube/cube.c                             |    1 +
contrib/pg_stat_statements/pg_stat_statements.c |    1 +
contrib/tsearch2/tsearch2.c                     |    1 +
src/backend/access/common/reloptions.c          |    2 ++
src/backend/access/gin/ginarrayproc.c           |    1 +
src/backend/access/transam/slru.c               |    1 +
src/backend/access/transam/twophase_rmgr.c      |    1 +
src/backend/access/transam/varsup.c             |    1 +
src/backend/access/transam/xact.c               |    3 +++
src/backend/access/transam/xlogutils.c          |    2 ++
src/backend/bootstrap/bootstrap.c               |    1 +
src/backend/catalog/dependency.c                |    1 +
src/backend/catalog/index.c                     |    1 +
src/backend/catalog/namespace.c                 |    1 +
src/backend/catalog/pg_constraint.c             |    1 +
src/backend/commands/analyze.c                  |    2 ++
src/backend/commands/discard.c                  |    1 +
src/backend/commands/functioncmds.c             |    1 +
src/backend/commands/indexcmds.c                |    1 +
src/backend/commands/sequence.c                 |    1 +
src/backend/commands/tablespace.c               |    1 +
src/backend/commands/vacuum.c                   |    2 ++
src/backend/executor/nodeIndexscan.c            |    1 +
src/backend/executor/nodeSubplan.c              |    1 +
src/backend/executor/nodeTidscan.c              |    1 +
src/backend/optimizer/util/predtest.c           |    1 +
src/backend/parser/parse_clause.c               |    1 +
src/backend/postmaster/bgwriter.c               |    5 +++++
src/backend/postmaster/walwriter.c              |    3 +++
src/backend/replication/syncrep.c               |    6 ++++++
src/backend/replication/walreceiver.c           |    2 ++
src/backend/replication/walreceiverfuncs.c      |    1 +
src/backend/replication/walsender.c             |    1 +
src/backend/storage/ipc/procarray.c             |    1 +
src/backend/storage/ipc/procsignal.c            |    1 +
src/backend/storage/lmgr/lwlock.c               |    2 ++
src/backend/storage/smgr/smgr.c                 |    1 +
src/backend/utils/adt/arrayfuncs.c              |    1 +
src/backend/utils/adt/enum.c                    |    1 +
src/backend/utils/adt/int.c                     |    1 +
src/backend/utils/adt/regexp.c                  |    1 +
src/backend/utils/adt/ri_triggers.c             |    1 +
src/backend/utils/adt/ruleutils.c               |    1 +
src/backend/utils/cache/relcache.c              |    1 +
src/backend/utils/cache/relmapper.c             |    1 +
src/backend/utils/cache/spccache.c              |    1 +
src/backend/utils/fmgr/funcapi.c                |    1 +
src/backend/utils/hash/dynahash.c               |    2 ++
src/backend/utils/resowner/resowner.c           |    1 +
src/backend/utils/time/combocid.c               |    2 ++
src/backend/utils/time/snapmgr.c                |    1 +
src/include/access/gin.h                        |    1 +
src/include/access/heapam.h                     |    2 ++
src/include/access/xact.h                       |    2 ++
src/include/access/xlog.h                       |    1 -
src/include/access/xlog_internal.h              |    2 ++
src/include/catalog/storage.h                   |    2 ++
src/include/commands/copy.h                     |    2 ++
src/include/commands/dbcommands.h               |    1 +
src/include/commands/portalcmds.h               |    1 +
src/include/commands/sequence.h                 |    2 ++
src/include/commands/tablespace.h               |    1 +
src/include/commands/trigger.h                  |    1 +
src/include/executor/execdesc.h                 |    1 +
src/include/executor/functions.h                |    1 +
src/include/executor/spi.h                      |    1 +
src/include/replication/syncrep.h               |    8 +-------
src/include/replication/walsender.h             |    3 +--
src/include/storage/standby.h                   |    2 ++
src/include/tcop/pquery.h                       |    1 +
src/include/tcop/tcopprot.h                     |    2 ++
src/pl/plpgsql/src/pl_comp.c                    |    1 +
src/pl/plpgsql/src/pl_handler.c                 |    1 +
74 files changed, 102 insertions(+), 10 deletions(-)

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2011-09-04 05:18:01
Subject: Re: Re: [COMMITTERS] pgsql: Remove "fmgr.h" include in cube contrib --- caused crash on a Ge
Previous:From: Bruce MomjianDate: 2011-09-04 04:30:43
Subject: Re: Re: [COMMITTERS] pgsql: Remove "fmgr.h" include in cube contrib --- caused crash on a Ge

pgsql-committers by date

Next:From: Tom LaneDate: 2011-09-04 05:18:01
Subject: Re: Re: [COMMITTERS] pgsql: Remove "fmgr.h" include in cube contrib --- caused crash on a Ge
Previous:From: Bruce MomjianDate: 2011-09-04 04:30:43
Subject: Re: Re: [COMMITTERS] pgsql: Remove "fmgr.h" include in cube contrib --- caused crash on a Ge

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group