diff --git a/src/backend/access/gist/gist.c b/src/backend/access/gist/gist.c
index 90817742eccf625a2a7a8ef42ded4b3cece2b61a..4e103de86943bb03ced39e8a7e7f6088c7b1ab3c 100644
--- a/src/backend/access/gist/gist.c
+++ b/src/backend/access/gist/gist.c
@@ -10,30 +10,21 @@
  *
  *-------------------------------------------------------------------------
  */
-#include "postgres.h"
 
-#include "storage/bufmgr.h"
-#include "storage/bufpage.h"
+#include "postgres.h"
 
-#include "utils/elog.h"
-#include "utils/palloc.h"
 #include "utils/rel.h"
-#include "utils/excid.h"
-
-#include "access/heapam.h"
-#include "access/genam.h"
+#include "access/itup.h"
 #include "access/gist.h"
-#include "access/gistscan.h"
 #include "access/funcindex.h"
-#include "access/tupdesc.h"
-
-#include "nodes/execnodes.h"
-#include "nodes/plannodes.h"
-
-#include "executor/executor.h"
+#include "access/htup.h"
 #include "executor/tuptable.h"
+#include "access/relscan.h"
+#include "nodes/execnodes.h"
+#include "storage/bufmgr.h"
+#include "catalog/pg_index.h"
+#include "utils/syscache.h"
 
-#include "catalog/index.h"
 
 /* non-export function prototypes */
 static InsertIndexResult gistdoinsert(Relation r, IndexTuple itup,
diff --git a/src/backend/access/gist/gistget.c b/src/backend/access/gist/gistget.c
index d60b0a1194e83584606d8ec34d08d4f4cdcaac1f..290638eea1308f0074eb0572458dfd2f7cd4b58b 100644
--- a/src/backend/access/gist/gistget.c
+++ b/src/backend/access/gist/gistget.c
@@ -10,22 +10,16 @@
  *
  *-------------------------------------------------------------------------
  */
-#include "postgres.h"
 
-#include "storage/bufmgr.h"
-#include "storage/bufpage.h"
+#include "postgres.h"
 
-#include "utils/elog.h"
-#include "utils/palloc.h"
 #include "utils/rel.h"
-
-#include "access/heapam.h"
-#include "access/genam.h"
-#include "access/iqual.h"
-#include "access/gist.h"
+#include "access/htup.h"
+#include "access/relscan.h"
+#include "storage/bufpage.h"
 #include "access/sdir.h"
-
-#include "executor/execdebug.h"
+#include "access/itup.h"
+#include "access/gist.h"
 
 static OffsetNumber gistfindnext(IndexScanDesc s, Page p, OffsetNumber n, 
 				 ScanDirection dir);
diff --git a/src/backend/access/gist/gistscan.c b/src/backend/access/gist/gistscan.c
index fd9f8e1a5fc248fc5e05ca67883a45a71d03abf6..2889369bd4e029e521a602968f2baa713bca0991 100644
--- a/src/backend/access/gist/gistscan.c
+++ b/src/backend/access/gist/gistscan.c
@@ -9,19 +9,13 @@
  *
  *-------------------------------------------------------------------------
  */
-#include "postgres.h"
 
-#include "storage/bufmgr.h"
-#include "storage/bufpage.h"
+#include "postgres.h"
 
-#include "utils/elog.h"
-#include "utils/palloc.h"
 #include "utils/rel.h"
-
-#include "access/heapam.h"
-#include "access/genam.h"
+#include "access/htup.h"
+#include "access/relscan.h"
 #include "access/gist.h"
-#include "access/giststrat.h"
 
 /* routines defined and used here */
 static void gistregscan(IndexScanDesc s);
diff --git a/src/backend/access/gist/giststrat.c b/src/backend/access/gist/giststrat.c
index 1dea1946d9b73cb7c820f58b7969c49638526153..440fdc2ef19bb1fed18b3bc852ce576105ca3c03 100644
--- a/src/backend/access/gist/giststrat.c
+++ b/src/backend/access/gist/giststrat.c
@@ -11,14 +11,11 @@
  *
  *-------------------------------------------------------------------------
  */
-#include "c.h"
 
+#include "postgres.h"
 #include "utils/rel.h"
-
-#include "storage/bufmgr.h"
-#include "storage/bufpage.h"
-
-#include "access/istrat.h"
+#include "storage/off.h"
+#include "storage/block.h"
 #include "access/gist.h"
 
 /*
diff --git a/src/include/access/gist.h b/src/include/access/gist.h
index e2d59c2f9fb73ca916a8efde1833508e888beda8..e77918a21aaf2bf1751086b40c1ad35d5213f45d 100644
--- a/src/include/access/gist.h
+++ b/src/include/access/gist.h
@@ -12,11 +12,8 @@
 #ifndef GIST_H
 #define GIST_H
 
-#include "utils/rel.h"
-#include "storage/off.h"
-#include "storage/block.h"
 #include "storage/bufpage.h"
-#include "access/skey.h"
+
 
 /* 
 ** You can have as many strategies as you please in GiSTs, as
diff --git a/src/include/access/relscan.h b/src/include/access/relscan.h
index 561fc3298bd0048c944aeaae7d5472c5c5aec2b8..43ee60acbc161f71ba83908967b376444f7cdaab 100644
--- a/src/include/access/relscan.h
+++ b/src/include/access/relscan.h
@@ -6,22 +6,17 @@
  *
  * Copyright (c) 1994, Regents of the University of California
  *
- * $Id: relscan.h,v 1.1 1996/08/27 21:50:20 scrappy Exp $
+ * $Id: relscan.h,v 1.2 1996/10/19 06:27:08 scrappy Exp $
  *
  *-------------------------------------------------------------------------
  */
 #ifndef	RELSCAN_H
 #define RELSCAN_H
 
-#include "c.h"
-
-#include "access/skey.h"
+#include "utils/tqual.h"
 #include "storage/buf.h"
-#include "access/htup.h"
-#include "storage/itemptr.h"
 
-#include "utils/tqual.h"
-#include "utils/rel.h"
+
 
 
 typedef ItemPointerData	MarkData;
diff --git a/src/include/executor/hashjoin.h b/src/include/executor/hashjoin.h
index 4e3dcc81c0ae14926555981fc859b0d53a862f65..42096fda8e214a058d28fd1ceed925ed8fac6575 100644
--- a/src/include/executor/hashjoin.h
+++ b/src/include/executor/hashjoin.h
@@ -6,14 +6,13 @@
  *
  * Copyright (c) 1994, Regents of the University of California
  *
- * $Id: hashjoin.h,v 1.1 1996/08/28 07:22:13 scrappy Exp $
+ * $Id: hashjoin.h,v 1.2 1996/10/19 06:27:33 scrappy Exp $
  *
  *-------------------------------------------------------------------------
  */
 #ifndef	HASHJOIN_H
 #define HASHJOIN_H
 
-#include "access/htup.h"
 #include "storage/ipc.h"
 
 /* -----------------
diff --git a/src/include/nodes/execnodes.h b/src/include/nodes/execnodes.h
index 60ee4b4a9fc93e629732459481fde2bf2336b914..db6c1a792e893b7598d5653a2e58b2de85a508e4 100644
--- a/src/include/nodes/execnodes.h
+++ b/src/include/nodes/execnodes.h
@@ -6,30 +6,18 @@
  *
  * Copyright (c) 1994, Regents of the University of California
  *
- * $Id: execnodes.h,v 1.1 1996/08/28 01:57:30 scrappy Exp $
+ * $Id: execnodes.h,v 1.2 1996/10/19 06:27:25 scrappy Exp $
  *
  *-------------------------------------------------------------------------
  */
 #ifndef EXECNODES_H
 #define EXECNODES_H
 
-#include "postgres.h"
-
-#include "nodes/nodes.h"
-#include "nodes/primnodes.h"
-#include "nodes/pg_list.h"
-
-#include "nodes/memnodes.h"
-
-#include "storage/item.h"
+#include "nodes/params.h"
 #include "access/sdir.h"
-#include "access/htup.h"
-#include "access/tupdesc.h"
-#include "access/funcindex.h"
-#include "utils/rel.h"
-#include "access/relscan.h"
 #include "executor/hashjoin.h"
-#include "executor/tuptable.h"
+#include "nodes/primnodes.h"
+#include "nodes/memnodes.h"
 
 /* ----------------
  *    IndexInfo information
diff --git a/src/include/nodes/memnodes.h b/src/include/nodes/memnodes.h
index 2fe3b85d6aef99c896a8910fbae0f39cd810c195..d508e9ef4555e6beafab2fb84224feff7381f268 100644
--- a/src/include/nodes/memnodes.h
+++ b/src/include/nodes/memnodes.h
@@ -6,7 +6,7 @@
  *
  * Copyright (c) 1994, Regents of the University of California
  *
- * $Id: memnodes.h,v 1.1 1996/08/28 01:57:34 scrappy Exp $
+ * $Id: memnodes.h,v 1.2 1996/10/19 06:27:27 scrappy Exp $
  *
  * XXX the typedefs in this file are different from the other ???nodes.h;
  *    they are pointers to structures instead of the structures themselves.
@@ -18,12 +18,9 @@
 #ifndef	MEMNODES_H
 #define MEMNODES_H
 
-#include "c.h"
-
 #include "utils/memutils.h"
 #include "lib/fstack.h"
 
-#include "nodes/nodes.h"
 
 /*
  * MemoryContext --
diff --git a/src/include/storage/bufmgr.h b/src/include/storage/bufmgr.h
index 274f59d9862136bc578cd1ac86c30f85b22e98c5..8350076ad62d2ace9762749b6267d69969184235 100644
--- a/src/include/storage/bufmgr.h
+++ b/src/include/storage/bufmgr.h
@@ -6,19 +6,14 @@
  *
  * Copyright (c) 1994, Regents of the University of California
  *
- * $Id: bufmgr.h,v 1.1 1996/08/28 01:58:01 scrappy Exp $
+ * $Id: bufmgr.h,v 1.2 1996/10/19 06:27:14 scrappy Exp $
  *
  *-------------------------------------------------------------------------
  */
 #ifndef	BUFMGR_H
 #define BUFMGR_H
 
-#include "c.h"
-
-#include "machine.h"		/* for BLCKSZ */
-#include "utils/rel.h"
-
-#include "storage/buf_internals.h"	/* UGLY! -- ay */
+#include <stdio.h>
 
 /*
  * the maximum size of a disk block for any possible installation.
diff --git a/src/include/storage/ipc.h b/src/include/storage/ipc.h
index 9d0ec8fd8ebe3985eb24c888e4cee685e5e21879..9ee9ef5b9a3d07cc8d525a58cda3302390482396 100644
--- a/src/include/storage/ipc.h
+++ b/src/include/storage/ipc.h
@@ -6,7 +6,7 @@
  *
  * Copyright (c) 1994, Regents of the University of California
  *
- * $Id: ipc.h,v 1.3 1996/10/11 03:56:27 scrappy Exp $
+ * $Id: ipc.h,v 1.4 1996/10/19 06:27:12 scrappy Exp $
  *
  * NOTES
  *    This file is very architecture-specific.  This stuff should actually
@@ -17,13 +17,11 @@
 #ifndef	IPC_H
 #define IPC_H
 
-#include <sys/types.h>
 #ifndef	_IPC_
 #define _IPC_
-#include <sys/ipc.h>
 #endif
 
-#include "c.h"
+#include <sys/types.h>
 
 /*
  * Many architectures have support for user-level spinlocks (i.e., an
@@ -63,7 +61,6 @@ typedef unsigned int	slock_t;
 #else /* aix */
 
 #if defined(PORTNAME_alpha)
-#include <sys/mman.h>
 typedef msemaphore	slock_t;
 #else /* alpha */
 
@@ -76,7 +73,6 @@ typedef struct { int sem[4]; } slock_t;
 #else /* hpux */
 
 #if defined(PORTNAME_irix5)
-#include <abi_mutex.h>
 typedef abilock_t	slock_t;
 #else /* irix5 */
 
@@ -86,7 +82,6 @@ typedef abilock_t	slock_t;
  * spinlocks.
  */
 #undef NEVER	/* definition in cthreads.h conflicts with parse.h */
-#include <mach/cthreads.h>
 typedef struct mutex	slock_t;
 #else /* next */