summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorTom Lane2011-09-04 05:13:16 +0000
committerTom Lane2011-09-04 05:13:16 +0000
commit1609797c25f6b440371045039733d69fe8cb9410 (patch)
tree7bd7b661545d483b19e11e33fccde8eee9b6c61b /src/include
parentf116b1f5b8d36e54404b36f1aba1295cbcfc4fdc (diff)
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.
Diffstat (limited to 'src/include')
-rw-r--r--src/include/access/gin.h1
-rw-r--r--src/include/access/heapam.h2
-rw-r--r--src/include/access/xact.h2
-rw-r--r--src/include/access/xlog.h1
-rw-r--r--src/include/access/xlog_internal.h2
-rw-r--r--src/include/catalog/storage.h2
-rw-r--r--src/include/commands/copy.h2
-rw-r--r--src/include/commands/dbcommands.h1
-rw-r--r--src/include/commands/portalcmds.h1
-rw-r--r--src/include/commands/sequence.h2
-rw-r--r--src/include/commands/tablespace.h1
-rw-r--r--src/include/commands/trigger.h1
-rw-r--r--src/include/executor/execdesc.h1
-rw-r--r--src/include/executor/functions.h1
-rw-r--r--src/include/executor/spi.h1
-rw-r--r--src/include/replication/syncrep.h8
-rw-r--r--src/include/replication/walsender.h3
-rw-r--r--src/include/storage/standby.h2
-rw-r--r--src/include/tcop/pquery.h1
-rw-r--r--src/include/tcop/tcopprot.h2
20 files changed, 27 insertions, 10 deletions
diff --git a/src/include/access/gin.h b/src/include/access/gin.h
index aeba4c1e080..31e9733546a 100644
--- a/src/include/access/gin.h
+++ b/src/include/access/gin.h
@@ -11,6 +11,7 @@
#define GIN_H
#include "access/xlog.h"
+#include "storage/block.h"
#include "utils/relcache.h"
diff --git a/src/include/access/heapam.h b/src/include/access/heapam.h
index b8d06abf1f3..776ea5c4cc5 100644
--- a/src/include/access/heapam.h
+++ b/src/include/access/heapam.h
@@ -17,6 +17,8 @@
#include "access/sdir.h"
#include "access/skey.h"
#include "access/xlog.h"
+#include "nodes/primnodes.h"
+#include "storage/lock.h"
#include "utils/relcache.h"
#include "utils/snapshot.h"
diff --git a/src/include/access/xact.h b/src/include/access/xact.h
index 575bcd3cde1..aaa620469f1 100644
--- a/src/include/access/xact.h
+++ b/src/include/access/xact.h
@@ -15,6 +15,8 @@
#define XACT_H
#include "access/xlog.h"
+#include "nodes/pg_list.h"
+#include "storage/relfilenode.h"
/*
diff --git a/src/include/access/xlog.h b/src/include/access/xlog.h
index 64f342ce594..3771ccbec4c 100644
--- a/src/include/access/xlog.h
+++ b/src/include/access/xlog.h
@@ -14,7 +14,6 @@
#include "access/rmgr.h"
#include "access/xlogdefs.h"
#include "lib/stringinfo.h"
-#include "replication/walsender.h"
#include "storage/buf.h"
#include "utils/pg_crc.h"
#include "utils/timestamp.h"
diff --git a/src/include/access/xlog_internal.h b/src/include/access/xlog_internal.h
index 097072ced13..68c06910159 100644
--- a/src/include/access/xlog_internal.h
+++ b/src/include/access/xlog_internal.h
@@ -17,6 +17,8 @@
#define XLOG_INTERNAL_H
#include "access/xlog.h"
+#include "storage/block.h"
+#include "storage/relfilenode.h"
/*
diff --git a/src/include/catalog/storage.h b/src/include/catalog/storage.h
index 5b4d674e5df..8769bfd6446 100644
--- a/src/include/catalog/storage.h
+++ b/src/include/catalog/storage.h
@@ -15,6 +15,8 @@
#define STORAGE_H
#include "access/xlog.h"
+#include "storage/block.h"
+#include "storage/relfilenode.h"
#include "utils/relcache.h"
extern void RelationCreateStorage(RelFileNode rnode, char relpersistence);
diff --git a/src/include/commands/copy.h b/src/include/commands/copy.h
index 06337e61149..a31479defb5 100644
--- a/src/include/commands/copy.h
+++ b/src/include/commands/copy.h
@@ -15,6 +15,8 @@
#define COPY_H
#include "nodes/execnodes.h"
+#include "nodes/parsenodes.h"
+#include "tcop/dest.h"
/* CopyStateData is private in commands/copy.c */
typedef struct CopyStateData *CopyState;
diff --git a/src/include/commands/dbcommands.h b/src/include/commands/dbcommands.h
index e704380b604..21dacff39c7 100644
--- a/src/include/commands/dbcommands.h
+++ b/src/include/commands/dbcommands.h
@@ -15,6 +15,7 @@
#define DBCOMMANDS_H
#include "access/xlog.h"
+#include "nodes/parsenodes.h"
/* XLOG stuff */
#define XLOG_DBASE_CREATE 0x00
diff --git a/src/include/commands/portalcmds.h b/src/include/commands/portalcmds.h
index 49605da63eb..87c57f4c873 100644
--- a/src/include/commands/portalcmds.h
+++ b/src/include/commands/portalcmds.h
@@ -14,6 +14,7 @@
#ifndef PORTALCMDS_H
#define PORTALCMDS_H
+#include "nodes/parsenodes.h"
#include "utils/portal.h"
diff --git a/src/include/commands/sequence.h b/src/include/commands/sequence.h
index 1ef0f91e95a..85452b0cfdd 100644
--- a/src/include/commands/sequence.h
+++ b/src/include/commands/sequence.h
@@ -13,6 +13,8 @@
#ifndef SEQUENCE_H
#define SEQUENCE_H
+#include "nodes/parsenodes.h"
+#include "storage/relfilenode.h"
#include "access/xlog.h"
diff --git a/src/include/commands/tablespace.h b/src/include/commands/tablespace.h
index 5b1fb6eddc5..4692098a65f 100644
--- a/src/include/commands/tablespace.h
+++ b/src/include/commands/tablespace.h
@@ -15,6 +15,7 @@
#define TABLESPACE_H
#include "access/xlog.h"
+#include "nodes/parsenodes.h"
/* XLOG stuff */
#define XLOG_TBLSPC_CREATE 0x00
diff --git a/src/include/commands/trigger.h b/src/include/commands/trigger.h
index 3ac4a823ec1..fe21298b648 100644
--- a/src/include/commands/trigger.h
+++ b/src/include/commands/trigger.h
@@ -14,6 +14,7 @@
#define TRIGGER_H
#include "nodes/execnodes.h"
+#include "nodes/parsenodes.h"
/*
* TriggerData is the node type that is passed as fmgr "context" info
diff --git a/src/include/executor/execdesc.h b/src/include/executor/execdesc.h
index 1c00b0dd27d..2925deb7b68 100644
--- a/src/include/executor/execdesc.h
+++ b/src/include/executor/execdesc.h
@@ -16,6 +16,7 @@
#define EXECDESC_H
#include "nodes/execnodes.h"
+#include "tcop/dest.h"
/* ----------------
diff --git a/src/include/executor/functions.h b/src/include/executor/functions.h
index d565469b267..aaa36c5826d 100644
--- a/src/include/executor/functions.h
+++ b/src/include/executor/functions.h
@@ -15,6 +15,7 @@
#define FUNCTIONS_H
#include "nodes/execnodes.h"
+#include "tcop/dest.h"
/* This struct is known only within executor/functions.c */
typedef struct SQLFunctionParseInfo *SQLFunctionParseInfoPtr;
diff --git a/src/include/executor/spi.h b/src/include/executor/spi.h
index d0c7696d34c..7199debb27a 100644
--- a/src/include/executor/spi.h
+++ b/src/include/executor/spi.h
@@ -13,6 +13,7 @@
#ifndef SPI_H
#define SPI_H
+#include "nodes/parsenodes.h"
#include "utils/portal.h"
diff --git a/src/include/replication/syncrep.h b/src/include/replication/syncrep.h
index d71047e1470..65b725f767e 100644
--- a/src/include/replication/syncrep.h
+++ b/src/include/replication/syncrep.h
@@ -13,15 +13,8 @@
#ifndef _SYNCREP_H
#define _SYNCREP_H
-#include "access/xlog.h"
-#include "storage/proc.h"
-#include "storage/shmem.h"
-#include "storage/spin.h"
#include "utils/guc.h"
-#define SyncRepRequested() \
- (max_wal_senders > 0 && synchronous_commit > SYNCHRONOUS_COMMIT_LOCAL_FLUSH)
-
/* syncRepState */
#define SYNC_REP_NOT_WAITING 0
#define SYNC_REP_WAITING 1
@@ -45,6 +38,7 @@ extern void SyncRepUpdateSyncStandbysDefined(void);
/* called by various procs */
extern int SyncRepWakeQueue(bool all);
+
extern bool check_synchronous_standby_names(char **newval, void **extra, GucSource source);
#endif /* _SYNCREP_H */
diff --git a/src/include/replication/walsender.h b/src/include/replication/walsender.h
index 1b7f50c52bb..fe4dac81aaf 100644
--- a/src/include/replication/walsender.h
+++ b/src/include/replication/walsender.h
@@ -12,10 +12,9 @@
#ifndef _WALSENDER_H
#define _WALSENDER_H
-#include "fmgr.h"
+#include "access/xlog.h"
#include "nodes/nodes.h"
#include "storage/latch.h"
-#include "replication/syncrep.h"
#include "storage/shmem.h"
#include "storage/spin.h"
diff --git a/src/include/storage/standby.h b/src/include/storage/standby.h
index d2e3e92d19c..6ebac62db54 100644
--- a/src/include/storage/standby.h
+++ b/src/include/storage/standby.h
@@ -15,7 +15,9 @@
#define STANDBY_H
#include "access/xlog.h"
+#include "storage/lock.h"
#include "storage/procsignal.h"
+#include "storage/relfilenode.h"
/* User-settable GUC parameters */
extern int vacuum_defer_cleanup_age;
diff --git a/src/include/tcop/pquery.h b/src/include/tcop/pquery.h
index 018577ecadc..2a5e871c92a 100644
--- a/src/include/tcop/pquery.h
+++ b/src/include/tcop/pquery.h
@@ -14,6 +14,7 @@
#ifndef PQUERY_H
#define PQUERY_H
+#include "nodes/parsenodes.h"
#include "utils/portal.h"
diff --git a/src/include/tcop/tcopprot.h b/src/include/tcop/tcopprot.h
index 898c7326816..d5192d98558 100644
--- a/src/include/tcop/tcopprot.h
+++ b/src/include/tcop/tcopprot.h
@@ -20,7 +20,9 @@
#define TCOPPROT_H
#include "executor/execdesc.h"
+#include "nodes/parsenodes.h"
#include "storage/procsignal.h"
+#include "utils/guc.h"
/* Required daylight between max_stack_depth and the kernel limit, in bytes */