]> granicus.if.org Git - postgresql/commitdiff
Clean up the #include mess a little.
authorTom Lane <tgl@sss.pgh.pa.us>
Sun, 4 Sep 2011 05:13:16 +0000 (01:13 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Sun, 4 Sep 2011 05:13:16 +0000 (01:13 -0400)
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.

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

index 42b45377fec9916d01fff0191be22e7f950c82e4..b3206987484e57a91850033fef01bc9c507172e9 100644 (file)
@@ -14,6 +14,7 @@
 
 #include "commands/explain.h"
 #include "executor/instrument.h"
+#include "utils/guc.h"
 
 PG_MODULE_MAGIC;
 
index b0564f75a4d8eb3c8b929c35b72cf5b8f69cb9f3..1d119ddbb50bda9b4f08bece60c4db24f652acb9 100644 (file)
@@ -13,6 +13,7 @@
 
 #include "access/gist.h"
 #include "access/skey.h"
+#include "utils/array.h"
 #include "utils/builtins.h"
 
 #include "cubedata.h"
index 582c8d6ccea317bdceeec970193b1c49a8d01cc0..eb4c494ae682aab01333b71716d3e89320460b62 100644 (file)
@@ -30,6 +30,7 @@
 #include "pgstat.h"
 #include "storage/fd.h"
 #include "storage/ipc.h"
+#include "storage/spin.h"
 #include "tcop/utility.h"
 #include "utils/builtins.h"
 
index 9b22d6f99a01ea876769a41a76bb1aa2036d6adc..2b3bc3fc1dbcdccac72db18351af68d577b0cd0e 100644 (file)
@@ -18,6 +18,7 @@
 #include "commands/trigger.h"
 #include "tsearch/ts_utils.h"
 #include "utils/builtins.h"
+#include "utils/guc.h"
 #include "utils/syscache.h"
 
 PG_MODULE_MAGIC;
index 7c63298cb017b1b6bfaac1d02ba258fe6665a1de..900b222865e15ae482d0ac46b8ed8a159275de23 100644 (file)
 #include "commands/defrem.h"
 #include "commands/tablespace.h"
 #include "nodes/makefuncs.h"
+#include "utils/array.h"
 #include "utils/attoptcache.h"
 #include "utils/builtins.h"
+#include "utils/guc.h"
 #include "utils/memutils.h"
 #include "utils/rel.h"
 
index 3e4b43d475825a1eb7ffa536533f1cf06876044d..2de58604eee7810648cfa3b426457e44ba6ce252 100644 (file)
@@ -15,6 +15,7 @@
 
 #include "access/gin.h"
 #include "access/skey.h"
+#include "utils/array.h"
 #include "utils/builtins.h"
 #include "utils/lsyscache.h"
 
index a83962b4f0adb4af2179b49d109cd8875496fd2a..69e5245beba14a7b6efb8b5d9b2ddd61b51dd13e 100644 (file)
@@ -55,6 +55,7 @@
 #include "access/transam.h"
 #include "access/xlog.h"
 #include "storage/fd.h"
+#include "storage/shmem.h"
 #include "miscadmin.h"
 
 
index 088c83735831acbca14f0109ffed181f00c4bd6d..eeb445da9d75a6bd41d1b05a1554c6e58bccd8ea 100644 (file)
@@ -17,6 +17,7 @@
 #include "access/multixact.h"
 #include "access/twophase_rmgr.h"
 #include "pgstat.h"
+#include "storage/lock.h"
 #include "storage/predicate.h"
 
 
index 41f261a4b63f623212115b8680019589ecb9850d..61dcfedad43624be85ef08c33205021f37d718e5 100644 (file)
@@ -21,6 +21,7 @@
 #include "miscadmin.h"
 #include "postmaster/autovacuum.h"
 #include "storage/pmsignal.h"
+#include "storage/proc.h"
 #include "utils/syscache.h"
 
 
index 7922f7ac209de04ba94b6e776f8478f0f2adea69..59685dc85ccb36749d24355c83a4cc8ed6cdca54 100644 (file)
 #include "libpq/be-fsstubs.h"
 #include "miscadmin.h"
 #include "pgstat.h"
+#include "replication/walsender.h"
+#include "replication/syncrep.h"
 #include "storage/lmgr.h"
 #include "storage/predicate.h"
 #include "storage/procarray.h"
 #include "storage/sinvaladt.h"
 #include "storage/smgr.h"
 #include "utils/combocid.h"
+#include "utils/guc.h"
 #include "utils/inval.h"
 #include "utils/memutils.h"
 #include "utils/relmapper.h"
index 038d593eea504cf96d383bbd0d0e25ea0c29605e..803d390772720bde8449c0aad8382f2e63530666 100644 (file)
@@ -21,6 +21,8 @@
 #include "access/xlogutils.h"
 #include "catalog/catalog.h"
 #include "storage/smgr.h"
+#include "utils/guc.h"
+#include "utils/hsearch.h"
 #include "utils/rel.h"
 
 
index ab148404b03c6062645c0c8c04b10e53486fe67d..baea46c0a89bb58187a6db9d970b0ac259aecfe4 100644 (file)
@@ -33,6 +33,7 @@
 #include "replication/walreceiver.h"
 #include "storage/bufmgr.h"
 #include "storage/ipc.h"
+#include "storage/proc.h"
 #include "tcop/tcopprot.h"
 #include "utils/builtins.h"
 #include "utils/fmgroids.h"
index 2bce663e5160de27d55a2294ea626f615bfe6cda..290e74a7779b5153e5bbb227f1de17fb2779f1d5 100644 (file)
@@ -71,6 +71,7 @@
 #include "utils/acl.h"
 #include "utils/builtins.h"
 #include "utils/fmgroids.h"
+#include "utils/guc.h"
 #include "utils/lsyscache.h"
 #include "utils/syscache.h"
 #include "utils/tqual.h"
index 509a86df69a48b6f159f48347dc8205189daf34b..67ade8f5e9da79eada944ef4120b468a8fc90f4e 100644 (file)
@@ -55,6 +55,7 @@
 #include "storage/smgr.h"
 #include "utils/builtins.h"
 #include "utils/fmgroids.h"
+#include "utils/guc.h"
 #include "utils/inval.h"
 #include "utils/lsyscache.h"
 #include "utils/memutils.h"
index 16568976a2cc42bf9667cae4072f79ce00aece3c..fcb41a8adb80ab401f7a487b90a56992330b526e 100644 (file)
@@ -46,6 +46,7 @@
 #include "storage/sinval.h"
 #include "utils/acl.h"
 #include "utils/builtins.h"
+#include "utils/guc.h"
 #include "utils/inval.h"
 #include "utils/lsyscache.h"
 #include "utils/memutils.h"
index e1cff30f8d824a97eac579509478dfceca66b0fd..69979942af42a00922fb4bce3ada1fa622dd2212 100644 (file)
@@ -23,6 +23,7 @@
 #include "catalog/pg_operator.h"
 #include "catalog/pg_type.h"
 #include "commands/defrem.h"
+#include "utils/array.h"
 #include "utils/builtins.h"
 #include "utils/fmgroids.h"
 #include "utils/lsyscache.h"
index a9ddb2c2807ee2cd4d7059961369961c0df015ed..7abf75dce66e0ad82075e68cfc302923e6a3a120 100644 (file)
 #include "postmaster/autovacuum.h"
 #include "storage/bufmgr.h"
 #include "storage/lmgr.h"
+#include "storage/proc.h"
 #include "storage/procarray.h"
 #include "utils/acl.h"
 #include "utils/attoptcache.h"
 #include "utils/datum.h"
+#include "utils/guc.h"
 #include "utils/lsyscache.h"
 #include "utils/memutils.h"
 #include "utils/pg_rusage.h"
index fae726a98761eeaf2bb6c4e109166978333a2b9e..5a5aaf98651cd68f3523a1d7224d7dec793ce333 100644 (file)
@@ -18,6 +18,7 @@
 #include "commands/async.h"
 #include "commands/discard.h"
 #include "commands/prepare.h"
+#include "utils/guc.h"
 #include "utils/portal.h"
 
 static void DiscardAll(bool isTopLevel);
index bee4313a52c06c259abcdd830175b2ae7f0c1a2d..92abd44a600e4c8e034f6c9a9081309f61ef32f4 100644 (file)
@@ -58,6 +58,7 @@
 #include "utils/acl.h"
 #include "utils/builtins.h"
 #include "utils/fmgroids.h"
+#include "utils/guc.h"
 #include "utils/lsyscache.h"
 #include "utils/rel.h"
 #include "utils/syscache.h"
index 80925d58a421dd5f93e0c0bbbb0056fb3551e8b1..69aa5bf6466a77042c5c6935c98b81bc48b4b28c 100644 (file)
@@ -35,6 +35,7 @@
 #include "parser/parse_func.h"
 #include "parser/parse_oper.h"
 #include "storage/lmgr.h"
+#include "storage/proc.h"
 #include "storage/procarray.h"
 #include "utils/acl.h"
 #include "utils/builtins.h"
index c23a39f758094dea9272160c19d1b183146ad0a5..54660f448055375f41efc42e05bee5f8eb10d264 100644 (file)
@@ -26,6 +26,7 @@
 #include "miscadmin.h"
 #include "nodes/makefuncs.h"
 #include "storage/lmgr.h"
+#include "storage/proc.h"
 #include "storage/smgr.h"
 #include "utils/acl.h"
 #include "utils/builtins.h"
index c8c9337b56e819fb1805d34be74e8c88dd4e3cd9..d223f8c9649e9b6b46e03b016fb0bff2b8df0493 100644 (file)
@@ -70,6 +70,7 @@
 #include "utils/acl.h"
 #include "utils/builtins.h"
 #include "utils/fmgroids.h"
+#include "utils/guc.h"
 #include "utils/memutils.h"
 #include "utils/rel.h"
 #include "utils/tqual.h"
index 005d72997bac179783f4b572d330a496a71a0dc4..7fe787ecb74f72caac9f6e4fa515ba9a0000d8a6 100644 (file)
 #include "postmaster/autovacuum.h"
 #include "storage/bufmgr.h"
 #include "storage/lmgr.h"
+#include "storage/proc.h"
 #include "storage/procarray.h"
 #include "utils/acl.h"
 #include "utils/fmgroids.h"
+#include "utils/guc.h"
 #include "utils/memutils.h"
 #include "utils/snapmgr.h"
 #include "utils/syscache.h"
index 9a74a8135d0c8bff7e22361b1b9d8dbfa6aa9c96..955008e012d56d0a8bb42c0c78719944fe41c7d1 100644 (file)
@@ -29,6 +29,7 @@
 #include "executor/execdebug.h"
 #include "executor/nodeIndexscan.h"
 #include "optimizer/clauses.h"
+#include "utils/array.h"
 #include "utils/lsyscache.h"
 #include "utils/memutils.h"
 #include "utils/rel.h"
index b0fb70488e89e7ea2aafcaea0d057ac47f4df302..0e12bb5afbdb2f39363348f4303da9af2fe04f75 100644 (file)
@@ -24,6 +24,7 @@
 #include "executor/nodeSubplan.h"
 #include "nodes/makefuncs.h"
 #include "optimizer/clauses.h"
+#include "utils/array.h"
 #include "utils/lsyscache.h"
 #include "utils/memutils.h"
 
index a54bb9dba3ec8b83f05a50f81c72502bb4ca4ada..69f47ff47283aae3af74ac9afd0f42aaed011126 100644 (file)
@@ -30,6 +30,7 @@
 #include "executor/nodeTidscan.h"
 #include "optimizer/clauses.h"
 #include "storage/bufmgr.h"
+#include "utils/array.h"
 #include "utils/rel.h"
 
 
index 304ca407ed46fbd1127f764ca6c34e7e3c6cf233..3e4a7752907d56cb9fa8d82322f0592c5f1ab353 100644 (file)
@@ -22,6 +22,7 @@
 #include "optimizer/clauses.h"
 #include "optimizer/planmain.h"
 #include "optimizer/predtest.h"
+#include "utils/array.h"
 #include "utils/inval.h"
 #include "utils/lsyscache.h"
 #include "utils/syscache.h"
index 978417d6ca72f758d6ba9565dbf32e07060d7764..e8177bca3fb002a178fe10c25800128e552a498f 100644 (file)
@@ -33,6 +33,7 @@
 #include "parser/parse_relation.h"
 #include "parser/parse_target.h"
 #include "rewrite/rewriteManip.h"
+#include "utils/guc.h"
 #include "utils/lsyscache.h"
 #include "utils/rel.h"
 
index 7443d807718b14cf68f72c2cfe7a23816b2b15a4..2d0b63987effaa7cdd6e7939680bbf3859f9eff8 100644 (file)
 #include "miscadmin.h"
 #include "pgstat.h"
 #include "postmaster/bgwriter.h"
+#include "replication/syncrep.h"
 #include "storage/bufmgr.h"
 #include "storage/ipc.h"
+#include "storage/lwlock.h"
 #include "storage/pmsignal.h"
+#include "storage/shmem.h"
 #include "storage/smgr.h"
+#include "storage/spin.h"
+#include "utils/guc.h"
 #include "utils/memutils.h"
 #include "utils/resowner.h"
 
index a51619948455970fbe591f550c1bebb71db3ff0b..23c4aacd7da9c5bc6c5a55eb61cdd43ce513de41 100644 (file)
 #include "postmaster/walwriter.h"
 #include "storage/bufmgr.h"
 #include "storage/ipc.h"
+#include "storage/lwlock.h"
 #include "storage/pmsignal.h"
 #include "storage/smgr.h"
+#include "utils/guc.h"
+#include "utils/hsearch.h"
 #include "utils/memutils.h"
 #include "utils/resowner.h"
 
index 65e0a59d08affacae5e149d4d484c6e4dd4ebcee..542bdf2bceb9ff4483aa12a4d8eaec2f1e29fea8 100644 (file)
 
 #include "access/xact.h"
 #include "miscadmin.h"
+#include "replication/syncrep.h"
+#include "replication/walsender.h"
 #include "storage/pmsignal.h"
+#include "storage/proc.h"
 #include "tcop/tcopprot.h"
 #include "utils/builtins.h"
 #include "utils/ps_status.h"
@@ -58,6 +61,9 @@ char     *SyncRepStandbyNames;
 #define SyncStandbysDefined() \
        (SyncRepStandbyNames != NULL && SyncRepStandbyNames[0] != '\0')
 
+#define SyncRepRequested() \
+       (max_wal_senders > 0 && synchronous_commit > SYNCHRONOUS_COMMIT_LOCAL_FLUSH)
+
 static bool announce_next_takeover = true;
 
 static void SyncRepQueueInsert(void);
index f4c6cc367221b7655cc2499394d60ff1281350e6..6d7f215d40571c5f5a854ce528fbf6181610662c 100644 (file)
 #include "miscadmin.h"
 #include "replication/walprotocol.h"
 #include "replication/walreceiver.h"
+#include "replication/walsender.h"
 #include "storage/ipc.h"
 #include "storage/pmsignal.h"
 #include "storage/procarray.h"
+#include "utils/guc.h"
 #include "utils/ps_status.h"
 #include "utils/resowner.h"
 
index fe009b5332bedc70d8a5d26997a4b25986f126d9..29c2f806e0b9d70ad579787d0734b4553697b453 100644 (file)
@@ -26,6 +26,7 @@
 #include "access/xlog_internal.h"
 #include "replication/walreceiver.h"
 #include "storage/pmsignal.h"
+#include "storage/shmem.h"
 
 WalRcvData *WalRcv = NULL;
 
index 0eadf6437ed5ea56c0ab515a4c33ffcba0104621..0e8098abf4a858caa1fd0f8dc7a0d9f6db61589e 100644 (file)
@@ -47,6 +47,7 @@
 #include "miscadmin.h"
 #include "nodes/replnodes.h"
 #include "replication/basebackup.h"
+#include "replication/syncrep.h"
 #include "replication/walprotocol.h"
 #include "replication/walreceiver.h"
 #include "replication/walsender.h"
index ba0cfde28a3959d286797c8451dd828a5b54dbdd..9489012a187440da1c6279e72ba7b4b96ade080a 100644 (file)
@@ -52,6 +52,7 @@
 #include "access/twophase.h"
 #include "miscadmin.h"
 #include "storage/procarray.h"
+#include "storage/spin.h"
 #include "utils/builtins.h"
 #include "utils/snapmgr.h"
 
index c8a9e867276f8891d2b40ad4fc30bbb36644b92e..c8393d773f7b791600a8ec3ca8518a0b5994e540 100644 (file)
@@ -20,6 +20,7 @@
 #include "bootstrap/bootstrap.h"
 #include "commands/async.h"
 #include "miscadmin.h"
+#include "storage/latch.h"
 #include "storage/ipc.h"
 #include "storage/sinval.h"
 #include "tcop/tcopprot.h"
index 2fe610532c4f9658ed36c6cf0bb7d3f14e0a730e..8fae67ebbb5d50ce4355f54df02e0d1dacb554aa 100644 (file)
@@ -29,6 +29,8 @@
 #include "pg_trace.h"
 #include "storage/ipc.h"
 #include "storage/predicate.h"
+#include "storage/proc.h"
+#include "storage/spin.h"
 
 
 /* We use the ShmemLock spinlock to protect LWLockAssign */
index 5f1497d5f46c27f49919c66e7a43552f01d5ffb1..4f607cda73f80a825d1d4974d14eb83b796d28e0 100644 (file)
@@ -21,6 +21,7 @@
 #include "storage/bufmgr.h"
 #include "storage/ipc.h"
 #include "storage/smgr.h"
+#include "utils/hsearch.h"
 #include "utils/inval.h"
 
 
index 8705725580d0cdc0520ac35408e333c71aff6414..bfb6065172f4e889dae347c54ea3445acc998384 100644 (file)
@@ -18,6 +18,7 @@
 
 #include "funcapi.h"
 #include "libpq/pqformat.h"
+#include "utils/array.h"
 #include "utils/builtins.h"
 #include "utils/datum.h"
 #include "utils/lsyscache.h"
index f9ab358129909680eded8cd8c3b8a3bae0494686..457925f97aaae90420615f0260608c8420f7b6fe 100644 (file)
@@ -18,6 +18,7 @@
 #include "catalog/indexing.h"
 #include "catalog/pg_enum.h"
 #include "libpq/pqformat.h"
+#include "utils/array.h"
 #include "utils/builtins.h"
 #include "utils/fmgroids.h"
 #include "utils/snapmgr.h"
index fadcf7ace0ffb08be1a8a173b1452e55ad3b4058..a367421f82b6550f16477ff089f00ab58be16136 100644 (file)
@@ -34,6 +34,7 @@
 #include "catalog/pg_type.h"
 #include "funcapi.h"
 #include "libpq/pqformat.h"
+#include "utils/array.h"
 #include "utils/builtins.h"
 
 
index 61362c97e1b9881b04b55ee94f0c6b24a03681c1..70c8297b67c57f3f47d748f204ae93c2dc6aea1e 100644 (file)
@@ -32,6 +32,7 @@
 #include "catalog/pg_type.h"
 #include "funcapi.h"
 #include "regex/regex.h"
+#include "utils/array.h"
 #include "utils/builtins.h"
 
 #define PG_GETARG_TEXT_PP_IF_EXISTS(_n) \
index bf9b2bc5f031f97df5541c5bba350798389ec940..af194f0c90fd21591294d4e746f860cf298b6e8e 100644 (file)
@@ -44,6 +44,7 @@
 #include "miscadmin.h"
 #include "utils/builtins.h"
 #include "utils/fmgroids.h"
+#include "utils/guc.h"
 #include "utils/lsyscache.h"
 #include "utils/memutils.h"
 #include "utils/rel.h"
index f25c50f9a49ff113c785ae9e709acacd2e00fd8a..8852bf934638daf8666e918f1bcbe489ec6e910b 100644 (file)
@@ -47,6 +47,7 @@
 #include "rewrite/rewriteHandler.h"
 #include "rewrite/rewriteManip.h"
 #include "rewrite/rewriteSupport.h"
+#include "utils/array.h"
 #include "utils/builtins.h"
 #include "utils/fmgroids.h"
 #include "utils/lsyscache.h"
index 6101ef8071ea3c88f23d167081bf578e0eb4032e..b22ad07ca8fa4482bf68b5eb687703b0a4f979b8 100644 (file)
@@ -62,6 +62,7 @@
 #include "rewrite/rewriteDefine.h"
 #include "storage/lmgr.h"
 #include "storage/smgr.h"
+#include "utils/array.h"
 #include "utils/builtins.h"
 #include "utils/fmgroids.h"
 #include "utils/inval.h"
index 9337181f6872845c9c4b8a81962d0b61e23b38b6..b33a846f9d4a7a6c8c3f0558790fecaf082bdb26 100644 (file)
@@ -49,6 +49,7 @@
 #include "catalog/storage.h"
 #include "miscadmin.h"
 #include "storage/fd.h"
+#include "storage/lwlock.h"
 #include "utils/inval.h"
 #include "utils/relmapper.h"
 
index 54d8d6f8080d2368d4335823dcb63f57a1ba5f3b..228e7d1ec8f618958f417c106d1d3bf95c3dc224 100644 (file)
@@ -23,6 +23,7 @@
 #include "commands/tablespace.h"
 #include "miscadmin.h"
 #include "optimizer/cost.h"
+#include "utils/hsearch.h"
 #include "utils/inval.h"
 #include "utils/spccache.h"
 #include "utils/syscache.h"
index 3861f402c3db5240895f27ba38d4c263440365c5..0911c8083be36954a7232c8ce4dc73e7190bfb61 100644 (file)
@@ -19,6 +19,7 @@
 #include "funcapi.h"
 #include "nodes/nodeFuncs.h"
 #include "parser/parse_coerce.h"
+#include "utils/array.h"
 #include "utils/builtins.h"
 #include "utils/lsyscache.h"
 #include "utils/memutils.h"
index dad7994923c607b0f6de1eefc600e95a7154ac21..d9027291ee355057c813d3184e779193008f7c1f 100644 (file)
@@ -64,6 +64,8 @@
 #include "postgres.h"
 
 #include "access/xact.h"
+#include "storage/shmem.h"
+#include "storage/spin.h"
 #include "utils/dynahash.h"
 #include "utils/memutils.h"
 
index 773a0d82ef83e9e329406976bb81f0ef3f5745a9..b0faaa108a77f7a68027bb458bfe00941219a987 100644 (file)
@@ -22,6 +22,7 @@
 
 #include "access/hash.h"
 #include "storage/predicate.h"
+#include "storage/proc.h"
 #include "utils/memutils.h"
 #include "utils/rel.h"
 #include "utils/snapmgr.h"
index 28c8a172204d8e12565f5378105e7410db4f9e60..d9b37b2ba3ffc591cb3496598f4e920ffe94cde9 100644 (file)
 
 #include "postgres.h"
 
+#include "access/htup.h"
 #include "access/xact.h"
 #include "utils/combocid.h"
+#include "utils/hsearch.h"
 #include "utils/memutils.h"
 
 
index 4b674c7c4251af098df9685177705133313fa8d4..bb25ac6ab2c464480258335297ff4500c049bda6 100644 (file)
@@ -28,6 +28,7 @@
 #include "access/transam.h"
 #include "access/xact.h"
 #include "storage/predicate.h"
+#include "storage/proc.h"
 #include "storage/procarray.h"
 #include "utils/memutils.h"
 #include "utils/memutils.h"
index aeba4c1e080a6fa521a070a4e46bad247acd483d..31e9733546aad13f2884ed82ac09fb179dc882c1 100644 (file)
@@ -11,6 +11,7 @@
 #define GIN_H
 
 #include "access/xlog.h"
+#include "storage/block.h"
 #include "utils/relcache.h"
 
 
index b8d06abf1f37281fc45cdb5276e17006da4b99d5..776ea5c4cc58f3824d0e28a0397990a193ccbea2 100644 (file)
@@ -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"
 
index 575bcd3cde1306227b780fbad8a42e1b3691e04b..aaa620469f1d6b70be24f2283837027cabfe7f5b 100644 (file)
@@ -15,6 +15,8 @@
 #define XACT_H
 
 #include "access/xlog.h"
+#include "nodes/pg_list.h"
+#include "storage/relfilenode.h"
 
 
 /*
index 64f342ce5944f80e2a84f3271aad4da01d09112a..3771ccbec4c3baf028ad1172106d93aa595bf378 100644 (file)
@@ -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"
index 097072ced13777af35df94c174ba6761100482b9..68c069101591871a1f2f5c7575a37209c5098256 100644 (file)
@@ -17,6 +17,8 @@
 #define XLOG_INTERNAL_H
 
 #include "access/xlog.h"
+#include "storage/block.h"
+#include "storage/relfilenode.h"
 
 
 /*
index 5b4d674e5dfcde8ae58a9b68d285ee38bb8c4078..8769bfd64462ccf30b841a6069cae9eb867838e6 100644 (file)
@@ -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);
index 06337e611490826849193378423fadb394d46367..a31479defb5974f9a0c945fec13af2b64e163443 100644 (file)
@@ -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;
index e704380b6044d16d021b9d122cb961fa88ddb882..21dacff39c7bcff0050dc40e0ecb93ecd5538ea6 100644 (file)
@@ -15,6 +15,7 @@
 #define DBCOMMANDS_H
 
 #include "access/xlog.h"
+#include "nodes/parsenodes.h"
 
 /* XLOG stuff */
 #define XLOG_DBASE_CREATE              0x00
index 49605da63eb40f234ee226a3843b311daf0fde01..87c57f4c8734cf099a808864a0c40815d3184317 100644 (file)
@@ -14,6 +14,7 @@
 #ifndef PORTALCMDS_H
 #define PORTALCMDS_H
 
+#include "nodes/parsenodes.h"
 #include "utils/portal.h"
 
 
index 1ef0f91e95aaced1a0442b687c0952866b6854e5..85452b0cfdd8eee3977b61120801b734199b715f 100644 (file)
@@ -13,6 +13,8 @@
 #ifndef SEQUENCE_H
 #define SEQUENCE_H
 
+#include "nodes/parsenodes.h"
+#include "storage/relfilenode.h"
 #include "access/xlog.h"
 
 
index 5b1fb6eddc5eb46bcf36ce69e1e3513517d92806..4692098a65f74d23130bf67c750228e8c5f541ad 100644 (file)
@@ -15,6 +15,7 @@
 #define TABLESPACE_H
 
 #include "access/xlog.h"
+#include "nodes/parsenodes.h"
 
 /* XLOG stuff */
 #define XLOG_TBLSPC_CREATE             0x00
index 3ac4a823ec1d86dcfef5100cfc5fe17e49e3aee5..fe21298b6488d6460a5776108089101489060d52 100644 (file)
@@ -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
index 1c00b0dd27d94a472f1457da16ed54c0a09c3fcc..2925deb7b68e977eabfe48dabb14cb01d88905b1 100644 (file)
@@ -16,6 +16,7 @@
 #define EXECDESC_H
 
 #include "nodes/execnodes.h"
+#include "tcop/dest.h"
 
 
 /* ----------------
index d565469b267ce7aff4903948d14086b48a39352a..aaa36c5826d8498be69a4a83f8712a38403627b2 100644 (file)
@@ -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;
index d0c7696d34cf0817ec38548f124ef0cf86d541e3..7199debb27a06da75d9dcde8f73070fcf08beb69 100644 (file)
@@ -13,6 +13,7 @@
 #ifndef SPI_H
 #define SPI_H
 
+#include "nodes/parsenodes.h"
 #include "utils/portal.h"
 
 
index d71047e14703d68e21a945067fa9cf6739e98033..65b725f767e86e172f66bb07e62d295087c53f5d 100644 (file)
 #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 */
index 1b7f50c52bb82a62ff6b2ef35bfbf063267d1cc1..fe4dac81aaf72b2ad5b02a45d3f661053354032b 100644 (file)
 #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"
 
index d2e3e92d19c7ad1ccd484803da18f787d19f0829..6ebac62db5413d2fcaf26d658808656c90451b6d 100644 (file)
@@ -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;
index 018577ecadc69baeb26f012d62bff9488d27de90..2a5e871c92a0a4ab1a99508baa0104061d3dc7fe 100644 (file)
@@ -14,6 +14,7 @@
 #ifndef PQUERY_H
 #define PQUERY_H
 
+#include "nodes/parsenodes.h"
 #include "utils/portal.h"
 
 
index 898c7326816df6eeb22b1933d70714e93e64299c..d5192d98558de6f79a4e1015e3d79cbf68de25b4 100644 (file)
@@ -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 */
index afc745612ec6a45283b21042c1217478855decde..578cae57346f46cf11404499fd89630db239e1fe 100644 (file)
@@ -25,6 +25,7 @@
 #include "nodes/makefuncs.h"
 #include "parser/parse_type.h"
 #include "utils/builtins.h"
+#include "utils/guc.h"
 #include "utils/lsyscache.h"
 #include "utils/memutils.h"
 #include "utils/rel.h"
index a10e418b33a75c099cd20af98008c33db92b05f1..e6e71432ff9ae72e43c402a4873446234dc7d7da 100644 (file)
@@ -20,6 +20,7 @@
 #include "funcapi.h"
 #include "miscadmin.h"
 #include "utils/builtins.h"
+#include "utils/guc.h"
 #include "utils/lsyscache.h"
 #include "utils/syscache.h"