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 aeba4c1e08..31e9733546 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 b8d06abf1f..776ea5c4cc 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 575bcd3cde..aaa620469f 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 64f342ce59..3771ccbec4 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 097072ced1..68c0691015 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 5b4d674e5d..8769bfd644 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 06337e6114..a31479defb 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 e704380b60..21dacff39c 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 49605da63e..87c57f4c87 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 1ef0f91e95..85452b0cfd 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 5b1fb6eddc..4692098a65 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 3ac4a823ec..fe21298b64 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 1c00b0dd27..2925deb7b6 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 d565469b26..aaa36c5826 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 d0c7696d34..7199debb27 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 d71047e147..65b725f767 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 1b7f50c52b..fe4dac81aa 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 d2e3e92d19..6ebac62db5 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 018577ecad..2a5e871c92 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 898c732681..d5192d9855 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 */