]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Reduce header inclusions via execnodes.h
authorÁlvaro Herrera <alvherre@kurilemu.de>
Mon, 16 Mar 2026 13:34:57 +0000 (14:34 +0100)
committerÁlvaro Herrera <alvherre@kurilemu.de>
Mon, 16 Mar 2026 13:34:57 +0000 (14:34 +0100)
Remove a bunch of #include lines from execnodes.h.  Most of these
requier suitable typedefs to be added, so that it still compiles
standalone.  In one case, the fix is to move a struct definition to the
one .c file where it is needed.

Also some light clean up in plannodes.h and genam.h, though not as
extensive as in execnodes.h.

Author: Álvaro Herrera <alvherre@kurilemu.de>
Author: Andres Freund <andres@anarazel.de>
Discussion: https://postgr.es/m/202603131240.ihwqdxnj7w2o@alvherre.pgsql

122 files changed:
contrib/amcheck/verify_heapam.c
contrib/dblink/dblink.c
contrib/hstore/hstore_subs.c
contrib/pageinspect/brinfuncs.c
contrib/pageinspect/gistfuncs.c
contrib/pg_buffercache/pg_buffercache_pages.c
contrib/pg_stat_statements/pg_stat_statements.c
contrib/pg_walinspect/pg_walinspect.c
contrib/pgrowlocks/pgrowlocks.c
contrib/postgres_fdw/connection.c
contrib/postgres_fdw/postgres_fdw.c
contrib/tablefunc/tablefunc.c
contrib/tsm_system_time/tsm_system_time.c
contrib/xml2/xpath.c
src/backend/access/brin/brin.c
src/backend/access/gin/gininsert.c
src/backend/access/heap/heapam_handler.c
src/backend/access/nbtree/nbtsort.c
src/backend/access/transam/xlogprefetcher.c
src/backend/backup/walsummaryfuncs.c
src/backend/bootstrap/bootstrap.c
src/backend/catalog/index.c
src/backend/commands/analyze.c
src/backend/commands/copyfrom.c
src/backend/commands/copyfromparse.c
src/backend/commands/copyto.c
src/backend/commands/event_trigger.c
src/backend/commands/explain.c
src/backend/commands/extension.c
src/backend/commands/indexcmds.c
src/backend/commands/prepare.c
src/backend/commands/tablecmds.c
src/backend/commands/trigger.c
src/backend/commands/wait.c
src/backend/executor/execAmi.c
src/backend/executor/execAsync.c
src/backend/executor/execExprInterp.c
src/backend/executor/execMain.c
src/backend/executor/execPartition.c
src/backend/executor/execProcnode.c
src/backend/executor/execSRF.c
src/backend/executor/execUtils.c
src/backend/executor/functions.c
src/backend/executor/nodeAgg.c
src/backend/executor/nodeBitmapAnd.c
src/backend/executor/nodeBitmapHeapscan.c
src/backend/executor/nodeBitmapIndexscan.c
src/backend/executor/nodeBitmapOr.c
src/backend/executor/nodeCtescan.c
src/backend/executor/nodeFunctionscan.c
src/backend/executor/nodeGatherMerge.c
src/backend/executor/nodeGroup.c
src/backend/executor/nodeHash.c
src/backend/executor/nodeHashjoin.c
src/backend/executor/nodeIndexonlyscan.c
src/backend/executor/nodeIndexscan.c
src/backend/executor/nodeMaterial.c
src/backend/executor/nodeMergeAppend.c
src/backend/executor/nodeMergejoin.c
src/backend/executor/nodeModifyTable.c
src/backend/executor/nodeNamedtuplestorescan.c
src/backend/executor/nodeNestloop.c
src/backend/executor/nodeRecursiveunion.c
src/backend/executor/nodeSetOp.c
src/backend/executor/nodeTableFuncscan.c
src/backend/executor/nodeWindowAgg.c
src/backend/executor/nodeWorktablescan.c
src/backend/executor/spi.c
src/backend/foreign/foreign.c
src/backend/jit/jit.c
src/backend/optimizer/path/costsize.c
src/backend/optimizer/plan/initsplan.c
src/backend/optimizer/prep/preptlist.c
src/backend/optimizer/prep/prepunion.c
src/backend/optimizer/util/appendinfo.c
src/backend/optimizer/util/predtest.c
src/backend/parser/parse_utilcmd.c
src/backend/postmaster/autovacuum.c
src/backend/replication/logical/worker.c
src/backend/rewrite/rewriteGraphTable.c
src/backend/rewrite/rewriteManip.c
src/backend/storage/ipc/dsm_registry.c
src/backend/storage/ipc/shmem.c
src/backend/tcop/postgres.c
src/backend/utils/activity/wait_event_funcs.c
src/backend/utils/adt/acl.c
src/backend/utils/adt/arraysubs.c
src/backend/utils/adt/datetime.c
src/backend/utils/adt/hbafuncs.c
src/backend/utils/adt/json.c
src/backend/utils/adt/jsonbsubs.c
src/backend/utils/adt/jsonfuncs.c
src/backend/utils/adt/mcxtfuncs.c
src/backend/utils/adt/misc.c
src/backend/utils/adt/pgstatfuncs.c
src/backend/utils/adt/rangetypes.c
src/backend/utils/adt/varlena.c
src/backend/utils/cache/relcache.c
src/backend/utils/fmgr/fmgr.c
src/backend/utils/init/postinit.c
src/backend/utils/misc/guc_funcs.c
src/backend/utils/misc/pg_config.c
src/backend/utils/mmgr/portalmem.c
src/backend/utils/sort/tuplestore.c
src/include/access/genam.h
src/include/access/gin_private.h
src/include/bootstrap/bootstrap.h
src/include/catalog/index.h
src/include/commands/explain.h
src/include/commands/explain_state.h
src/include/executor/execScan.h
src/include/executor/executor.h
src/include/executor/hashjoin.h
src/include/lib/simplehash.h
src/include/nodes/execnodes.h
src/include/nodes/plannodes.h
src/pl/plperl/plperl.c
src/pl/tcl/pltcl.c
src/test/modules/injection_points/injection_points.c
src/test/modules/test_custom_stats/test_custom_var_stats.c
src/test/modules/test_ddl_deparse/test_ddl_deparse.c
src/test/modules/test_regex/test_regex.c

index 31e19fbc69775764dbb406aaf7dff441d82e23c4..ada782f98f5c13047fa94fd8b8d82d83b692b6b0 100644 (file)
@@ -29,6 +29,7 @@
 #include "utils/builtins.h"
 #include "utils/fmgroids.h"
 #include "utils/rel.h"
+#include "utils/tuplestore.h"
 
 PG_FUNCTION_INFO_V1(verify_heapam);
 
index 4038950a6efd8fe422dc0065f04fb611d73e090c..ac6127ec1b5d4d13019cc14bd6c5398a7bd1d243 100644 (file)
@@ -62,6 +62,7 @@
 #include "utils/lsyscache.h"
 #include "utils/memutils.h"
 #include "utils/rel.h"
+#include "utils/tuplestore.h"
 #include "utils/varlena.h"
 #include "utils/wait_event.h"
 
index 45b8c962038e8ad192e2cb442522606e44f5e802..56e0858c1a67c19cbd97a44298e8f0fa759a62f7 100644 (file)
@@ -23,6 +23,7 @@
  */
 #include "postgres.h"
 
+#include "catalog/pg_type_d.h"
 #include "executor/execExpr.h"
 #include "hstore.h"
 #include "nodes/nodeFuncs.h"
index 26cf78252edb65a5e1a5746815e987331b67a9ef..309b9522f9022dfb193a1a25f46ce4ab60f2e1db 100644 (file)
@@ -22,6 +22,7 @@
 #include "utils/builtins.h"
 #include "utils/lsyscache.h"
 #include "utils/rel.h"
+#include "utils/tuplestore.h"
 
 PG_FUNCTION_INFO_V1(brin_page_type);
 PG_FUNCTION_INFO_V1(brin_page_items);
index a205cb8a3347b0fecff4295b4381928713dcab6d..e56c7d8a601f0486456f146d1d4c8737d0fd526e 100644 (file)
@@ -25,6 +25,7 @@
 #include "utils/pg_lsn.h"
 #include "utils/rel.h"
 #include "utils/ruleutils.h"
+#include "utils/tuplestore.h"
 
 PG_FUNCTION_INFO_V1(gist_page_opaque_info);
 PG_FUNCTION_INFO_V1(gist_page_items);
index a6b4fb5252bb1cffc4cc09cb871dd7b0e92b6b5d..db4d711cce7d66e11725feb4d684cb3dd85183c5 100644 (file)
@@ -16,6 +16,7 @@
 #include "storage/buf_internals.h"
 #include "storage/bufmgr.h"
 #include "utils/rel.h"
+#include "utils/tuplestore.h"
 
 
 #define NUM_BUFFERCACHE_PAGES_MIN_ELEM 8
index 4a427533bd88d39bcd684de6038bba7d2945e878..6cb14824ec3b9e3c2b426431ee5f03beb1f1048e 100644 (file)
@@ -71,6 +71,7 @@
 #include "utils/builtins.h"
 #include "utils/memutils.h"
 #include "utils/timestamp.h"
+#include "utils/tuplestore.h"
 
 PG_MODULE_MAGIC_EXT(
                                        .name = "pg_stat_statements",
index 716a0922c6be05aa1bcb0bb790fc91fe5797e3ac..f6f5f0792d21b4f00341826cf3899ee82b8a8557 100644 (file)
 #include "access/xlogutils.h"
 #include "funcapi.h"
 #include "miscadmin.h"
+#include "port/pg_bitutils.h"
 #include "utils/array.h"
 #include "utils/builtins.h"
 #include "utils/pg_lsn.h"
+#include "utils/tuplestore.h"
 
 /*
  * NOTE: For any code change or issue fix here, it is highly recommended to
index f88269332b6be94be4a9c17bacbca5f69be6a4c3..ff3692c87c4f0e243babed8cbdf978caf74bf58a 100644 (file)
@@ -40,6 +40,7 @@
 #include "utils/fmgrprotos.h"
 #include "utils/rel.h"
 #include "utils/snapmgr.h"
+#include "utils/tuplestore.h"
 #include "utils/varlena.h"
 
 PG_MODULE_MAGIC_EXT(
index 7e2b822d16152ec8fee8688c0a6d1dadb3ecdeb4..192f8011160a99a3af7421c2cc39b0bf8a10b121 100644 (file)
@@ -33,6 +33,7 @@
 #include "utils/hsearch.h"
 #include "utils/inval.h"
 #include "utils/syscache.h"
+#include "utils/tuplestore.h"
 
 /*
  * Connection cache hash table entry
index 60d90329a651d98129e83f4bdab2f2822e9e161f..41e47cc795ba89cd22aa15538ca8bfa1e904a729 100644 (file)
@@ -22,6 +22,7 @@
 #include "commands/explain_format.h"
 #include "commands/explain_state.h"
 #include "executor/execAsync.h"
+#include "executor/instrument.h"
 #include "foreign/fdwapi.h"
 #include "funcapi.h"
 #include "miscadmin.h"
index ca2434c6e193e77b258b0954bc0790bbc5693c16..c01a01c5fe7116bfabd9f135606b024a66366e67 100644 (file)
@@ -43,6 +43,7 @@
 #include "lib/stringinfo.h"
 #include "miscadmin.h"
 #include "utils/builtins.h"
+#include "utils/tuplestore.h"
 
 PG_MODULE_MAGIC_EXT(
                                        .name = "tablefunc",
index 4b22eeae9a4a6c849f25325b353611eb04b3a8be..4814c31bc6fe0089d807a59ddbef4fbb0666add1 100644 (file)
@@ -30,6 +30,7 @@
 #include "catalog/pg_type.h"
 #include "miscadmin.h"
 #include "optimizer/optimizer.h"
+#include "portability/instr_time.h"
 #include "utils/sampling.h"
 #include "utils/spccache.h"
 
index 662d7d02f27b3b1d12d36756088a05bc198fb335..14b9e014d74d2bc82e014971d315588436118374 100644 (file)
@@ -12,6 +12,7 @@
 #include "funcapi.h"
 #include "lib/stringinfo.h"
 #include "utils/builtins.h"
+#include "utils/tuplestore.h"
 #include "utils/xml.h"
 
 /* libxml includes */
index 1909c3254b5baa1db04be25d4f9612c7021a7c09..2a0f8c8e3b8b29b2b729137a4af36bd7369661fd 100644 (file)
 #include "catalog/index.h"
 #include "catalog/pg_am.h"
 #include "commands/vacuum.h"
+#include "executor/instrument.h"
 #include "miscadmin.h"
 #include "pgstat.h"
 #include "postmaster/autovacuum.h"
 #include "storage/bufmgr.h"
+#include "storage/condition_variable.h"
 #include "storage/freespace.h"
 #include "storage/proc.h"
 #include "tcop/tcopprot.h"
index 97cea5f7d4e04f42757e00369d195f9cac9da665..e54782d9dd85248aea5f43656367048bf0a9b93a 100644 (file)
 #include "catalog/index.h"
 #include "catalog/pg_collation.h"
 #include "commands/progress.h"
+#include "executor/instrument.h"
 #include "miscadmin.h"
 #include "nodes/execnodes.h"
 #include "pgstat.h"
 #include "storage/bufmgr.h"
+#include "storage/condition_variable.h"
 #include "storage/proc.h"
 #include "storage/predicate.h"
 #include "tcop/tcopprot.h"
@@ -34,6 +36,7 @@
 #include "utils/memutils.h"
 #include "utils/builtins.h"
 #include "utils/rel.h"
+#include "utils/tuplesort.h"
 #include "utils/typcache.h"
 #include "utils/wait_event.h"
 
index 42bf73d3138a1d68f908f1ca47bf0f933e5010b7..253a735b6c1089f5952492c9e5868d62eb94c3b0 100644 (file)
@@ -45,6 +45,7 @@
 #include "storage/smgr.h"
 #include "utils/builtins.h"
 #include "utils/rel.h"
+#include "utils/tuplesort.h"
 
 static void reform_and_rewrite_tuple(HeapTuple tuple,
                                                                         Relation OldHeap, Relation NewHeap,
index 69ef1527e06097dc0aa320a1b5d4de61a72c560f..47a9bda30c9b1e0d76ff84b9d8a01c20b2c38248 100644 (file)
@@ -52,6 +52,7 @@
 #include "miscadmin.h"
 #include "pgstat.h"
 #include "storage/bulk_write.h"
+#include "storage/condition_variable.h"
 #include "storage/proc.h"
 #include "tcop/tcopprot.h"
 #include "utils/rel.h"
index 24cfa96d737a289be1a9c997ef17f2d59e709b94..c235eca7c516d5b07f4de163ce1e200f7df17a39 100644 (file)
 #include "miscadmin.h"
 #include "port/atomics.h"
 #include "storage/bufmgr.h"
+#include "storage/fd.h"
 #include "storage/shmem.h"
 #include "storage/smgr.h"
 #include "utils/fmgrprotos.h"
 #include "utils/guc_hooks.h"
 #include "utils/hsearch.h"
 #include "utils/timestamp.h"
+#include "utils/tuplestore.h"
 
 /*
  * Every time we process this much WAL, we'll update the values in
index eb26596cf0a2663ef55c26dd01cecf8b70423054..f83c1604263e92dca6dba2c17b3759f709e05433 100644 (file)
@@ -20,6 +20,7 @@
 #include "postmaster/walsummarizer.h"
 #include "utils/fmgrprotos.h"
 #include "utils/pg_lsn.h"
+#include "utils/tuplestore.h"
 
 #define NUM_WS_ATTS                    3
 #define NUM_SUMMARY_ATTS       6
index 17118f2fe760e7b8f54672bdc9d4409cee4f412d..68a42de0889dd3cb4c3741f3c32fd35dfc9cfb24 100644 (file)
@@ -35,6 +35,7 @@
 #include "pg_getopt.h"
 #include "postmaster/postmaster.h"
 #include "storage/bufpage.h"
+#include "storage/fd.h"
 #include "storage/ipc.h"
 #include "storage/proc.h"
 #include "utils/builtins.h"
index 0e93ababa87a42c31db347624bd88a2a713d028f..8b3c60d91f92622d6a4351611a167e7e817ef717 100644 (file)
@@ -24,6 +24,7 @@
 #include <unistd.h>
 
 #include "access/amapi.h"
+#include "access/attmap.h"
 #include "access/heapam.h"
 #include "access/multixact.h"
 #include "access/relscan.h"
index 53adac9139bd45785b187d9fee11fa036b0e7dfc..eeed91be2668e11dd0b17cf500c3671972bf130c 100644 (file)
@@ -34,6 +34,7 @@
 #include "commands/vacuum.h"
 #include "common/pg_prng.h"
 #include "executor/executor.h"
+#include "executor/instrument.h"
 #include "foreign/fdwapi.h"
 #include "miscadmin.h"
 #include "nodes/nodeFuncs.h"
index 95f6cb416a9c166d39789b8b5853edaee0ccd6a4..7516b69d01602277e299ac496d1bee0e5d98e943 100644 (file)
@@ -26,6 +26,7 @@
 
 #include "access/heapam.h"
 #include "access/tableam.h"
+#include "access/tupconvert.h"
 #include "access/xact.h"
 #include "catalog/namespace.h"
 #include "commands/copyapi.h"
index 00ee4154b8bcfcfe6d2baacaeac42982628153db..ed184ed8e9630e31ee074d62996ea9427c80b2cd 100644 (file)
@@ -71,6 +71,7 @@
 #include "mb/pg_wchar.h"
 #include "miscadmin.h"
 #include "pgstat.h"
+#include "port/pg_bitutils.h"
 #include "port/pg_bswap.h"
 #include "port/simd.h"
 #include "utils/builtins.h"
index d6ef7275a64ba12499983d5f68ca8ea39f5d0424..499ce9ad3db8d687bcb8afde2d3b528b50694fd7 100644 (file)
@@ -20,6 +20,7 @@
 
 #include "access/table.h"
 #include "access/tableam.h"
+#include "access/tupconvert.h"
 #include "catalog/pg_inherits.h"
 #include "commands/copyapi.h"
 #include "commands/progress.h"
index ff1323c7b821b246093dc72c703fce38170468d3..ace8eca1f98465a5f084008c40e0a3f1bd9a028e 100644 (file)
@@ -57,6 +57,7 @@
 #include "utils/rel.h"
 #include "utils/snapmgr.h"
 #include "utils/syscache.h"
+#include "utils/tuplestore.h"
 
 typedef struct EventTriggerQueryState
 {
index 5f922c3f5c2b4bd8876c469772cbcca7925acaf9..296ea8a1ed21ba57e919a5ff489a20b41efa5f09 100644 (file)
@@ -42,6 +42,7 @@
 #include "utils/ruleutils.h"
 #include "utils/snapmgr.h"
 #include "utils/tuplesort.h"
+#include "utils/tuplestore.h"
 #include "utils/typcache.h"
 #include "utils/xml.h"
 
index 963618a64c4c08c37ed23f07b65820136de06419..b98801d08f220cda65e38f532e1b61ec93a68e37 100644 (file)
@@ -69,6 +69,7 @@
 #include "utils/rel.h"
 #include "utils/snapmgr.h"
 #include "utils/syscache.h"
+#include "utils/tuplestore.h"
 #include "utils/varlena.h"
 
 
index 635679cc1f207035bf3b78caa99812117427b21a..cbd76066f74692580b0a3fd8d4f477e88132be1a 100644 (file)
@@ -16,6 +16,7 @@
 #include "postgres.h"
 
 #include "access/amapi.h"
+#include "access/attmap.h"
 #include "access/gist.h"
 #include "access/heapam.h"
 #include "access/htup_details.h"
index 5b86a727587b2e2f8a024af0cc5a0067381df9bb..876aad2100aeb333236690272fbc63d48dac9178 100644 (file)
 #include "tcop/pquery.h"
 #include "tcop/utility.h"
 #include "utils/builtins.h"
+#include "utils/hsearch.h"
 #include "utils/snapmgr.h"
 #include "utils/timestamp.h"
+#include "utils/tuplestore.h"
 
 
 /*
index 8118f7aa1effe588ef70510e47f067611998bdf4..dfdde986236fd2db78f7ed221db5e4922e93dc81 100644 (file)
@@ -25,6 +25,7 @@
 #include "access/sysattr.h"
 #include "access/tableam.h"
 #include "access/toast_compression.h"
+#include "access/tupconvert.h"
 #include "access/xact.h"
 #include "access/xlog.h"
 #include "access/xloginsert.h"
index 98d402c0a3be7cca16628fe66e61238a4ec5d09f..9c0438a125a5e947c186c995282cf0982861a166 100644 (file)
@@ -19,6 +19,7 @@
 #include "access/sysattr.h"
 #include "access/table.h"
 #include "access/tableam.h"
+#include "access/tupconvert.h"
 #include "access/xact.h"
 #include "catalog/catalog.h"
 #include "catalog/dependency.h"
@@ -32,6 +33,7 @@
 #include "catalog/pg_type.h"
 #include "commands/trigger.h"
 #include "executor/executor.h"
+#include "executor/instrument.h"
 #include "miscadmin.h"
 #include "nodes/bitmapset.h"
 #include "nodes/makefuncs.h"
index 8e920a723723f58b7dd98ca3632ec6e8ecbd6c36..e64e3be628565e3e600de2859dd12bb7b828089b 100644 (file)
@@ -18,6 +18,7 @@
 #include "access/xlog.h"
 #include "access/xlogrecovery.h"
 #include "access/xlogwait.h"
+#include "catalog/pg_type_d.h"
 #include "commands/defrem.h"
 #include "commands/wait.h"
 #include "executor/executor.h"
index 90a68c0d15646f36dec306c34c60f83f83aa83b9..37fe03fdc372f438f1a8827bb3cfa67d88b3b31a 100644 (file)
@@ -16,6 +16,7 @@
 #include "access/htup_details.h"
 #include "catalog/pg_class.h"
 #include "executor/executor.h"
+#include "executor/instrument.h"
 #include "executor/nodeAgg.h"
 #include "executor/nodeAppend.h"
 #include "executor/nodeBitmapAnd.h"
index 8728111355d649e1a1db4faf2d3bb9d93ff5838b..cf7ddbb01f430023b2132db1479fb89eb36837cd 100644 (file)
@@ -16,6 +16,7 @@
 
 #include "executor/execAsync.h"
 #include "executor/executor.h"
+#include "executor/instrument.h"
 #include "executor/nodeAppend.h"
 #include "executor/nodeForeignscan.h"
 
index 61ff5ddc74c24bbc29c32298c652d85001d44f60..98689649680c419f75fb09543b98bda9381a8f37 100644 (file)
@@ -57,6 +57,7 @@
 #include "postgres.h"
 
 #include "access/heaptoast.h"
+#include "access/tupconvert.h"
 #include "catalog/pg_type.h"
 #include "commands/sequence.h"
 #include "executor/execExpr.h"
@@ -77,6 +78,7 @@
 #include "utils/lsyscache.h"
 #include "utils/memutils.h"
 #include "utils/timestamp.h"
+#include "utils/tuplesort.h"
 #include "utils/typcache.h"
 #include "utils/xml.h"
 
index 4015aef1b1fd060c363cd79096f798700b91bb54..58b84955c2beb37e3f858aee6c359dc9946eb873 100644 (file)
@@ -40,6 +40,7 @@
 #include "access/sysattr.h"
 #include "access/table.h"
 #include "access/tableam.h"
+#include "access/tupconvert.h"
 #include "access/xact.h"
 #include "catalog/namespace.h"
 #include "catalog/partition.h"
@@ -47,6 +48,7 @@
 #include "commands/trigger.h"
 #include "executor/executor.h"
 #include "executor/execPartition.h"
+#include "executor/instrument.h"
 #include "executor/nodeSubplan.h"
 #include "foreign/fdwapi.h"
 #include "mb/pg_wchar.h"
index bab294f5e91ad1280ce47cfe02349e47b0c0f8f5..d96d4f9947b79227c59ae693404509ad3be9cbe9 100644 (file)
@@ -15,6 +15,7 @@
 
 #include "access/table.h"
 #include "access/tableam.h"
+#include "access/tupconvert.h"
 #include "catalog/index.h"
 #include "catalog/partition.h"
 #include "executor/execPartition.h"
index 7e40b85251718fa9178e7fd55e2343d00f1ee040..d35976925ae769ce12bdfbd697dbaadd92f627cd 100644 (file)
@@ -73,6 +73,7 @@
 #include "postgres.h"
 
 #include "executor/executor.h"
+#include "executor/instrument.h"
 #include "executor/nodeAgg.h"
 #include "executor/nodeAppend.h"
 #include "executor/nodeBitmapAnd.h"
index b481e50acfb8982a911601a9da5775bea78d7ae1..8aedcc6a4591b755c90d9982e2ae7e8f60b8744d 100644 (file)
@@ -30,6 +30,7 @@
 #include "utils/builtins.h"
 #include "utils/lsyscache.h"
 #include "utils/memutils.h"
+#include "utils/tuplestore.h"
 #include "utils/typcache.h"
 
 
index c3b9c188de1b7c10422b0daccac17aa0793a6c95..9886ab06b6955e52c2633faeb74747dc4f645edf 100644 (file)
@@ -48,6 +48,7 @@
 #include "access/parallel.h"
 #include "access/table.h"
 #include "access/tableam.h"
+#include "access/tupconvert.h"
 #include "executor/executor.h"
 #include "executor/nodeModifyTable.h"
 #include "jit/jit.h"
@@ -55,6 +56,7 @@
 #include "miscadmin.h"
 #include "parser/parse_relation.h"
 #include "partitioning/partdesc.h"
+#include "port/pg_bitutils.h"
 #include "storage/lmgr.h"
 #include "utils/builtins.h"
 #include "utils/memutils.h"
index 4ca342a43efa90bf88cc016cbee12af748a117fb..88109348817978900aaa60fb619f3dbdb4b479e3 100644 (file)
@@ -37,6 +37,7 @@
 #include "utils/plancache.h"
 #include "utils/snapmgr.h"
 #include "utils/syscache.h"
+#include "utils/tuplestore.h"
 
 
 /*
index e248213c09067d12bb9cb02fdf4b8e8237858e7c..925caadd2cea91693e3300b12d117be8c424120e 100644 (file)
 #include "common/hashfn.h"
 #include "executor/execExpr.h"
 #include "executor/executor.h"
+#include "executor/instrument.h"
 #include "executor/nodeAgg.h"
 #include "lib/hyperloglog.h"
 #include "miscadmin.h"
 #include "optimizer/optimizer.h"
 #include "parser/parse_agg.h"
 #include "parser/parse_coerce.h"
+#include "port/pg_bitutils.h"
 #include "utils/acl.h"
 #include "utils/builtins.h"
 #include "utils/datum.h"
index e6406c8f92b8f500bbc2ae74317966870015c956..9007dda3802b929d849da3ac467a838949f49920 100644 (file)
@@ -29,7 +29,9 @@
 #include "postgres.h"
 
 #include "executor/executor.h"
+#include "executor/instrument.h"
 #include "executor/nodeBitmapAnd.h"
+#include "nodes/tidbitmap.h"
 
 
 /* ----------------------------------------------------------------
index e581a4c3b32f37ec205324d6be8bc9e644c7afd2..7cf8d23c7422b76e21340ede5f3d86382aafeb66 100644 (file)
 #include "access/tableam.h"
 #include "access/visibilitymap.h"
 #include "executor/executor.h"
+#include "executor/instrument.h"
 #include "executor/nodeBitmapHeapscan.h"
 #include "miscadmin.h"
 #include "pgstat.h"
 #include "storage/bufmgr.h"
+#include "storage/condition_variable.h"
+#include "utils/dsa.h"
 #include "utils/rel.h"
 #include "utils/spccache.h"
 #include "utils/wait_event.h"
@@ -53,6 +56,43 @@ static inline void BitmapDoneInitializingSharedState(ParallelBitmapHeapState *ps
 static bool BitmapShouldInitializeSharedState(ParallelBitmapHeapState *pstate);
 
 
+/* ----------------
+ *      SharedBitmapState information
+ *
+ *             BM_INITIAL              TIDBitmap creation is not yet started, so first worker
+ *                                             to see this state will set the state to BM_INPROGRESS
+ *                                             and that process will be responsible for creating
+ *                                             TIDBitmap.
+ *             BM_INPROGRESS   TIDBitmap creation is in progress; workers need to
+ *                                             sleep until it's finished.
+ *             BM_FINISHED             TIDBitmap creation is done, so now all workers can
+ *                                             proceed to iterate over TIDBitmap.
+ * ----------------
+ */
+typedef enum
+{
+       BM_INITIAL,
+       BM_INPROGRESS,
+       BM_FINISHED,
+} SharedBitmapState;
+
+/* ----------------
+ *      ParallelBitmapHeapState information
+ *             tbmiterator                             iterator for scanning current pages
+ *             mutex                                   mutual exclusion for state
+ *             state                                   current state of the TIDBitmap
+ *             cv                                              conditional wait variable
+ * ----------------
+ */
+typedef struct ParallelBitmapHeapState
+{
+       dsa_pointer tbmiterator;
+       slock_t         mutex;
+       SharedBitmapState state;
+       ConditionVariable cv;
+} ParallelBitmapHeapState;
+
+
 /*
  * Do the underlying index scan, build the bitmap, set up the parallel state
  * needed for parallel workers to iterate through the bitmap, and set up the
index e08b1c43ace26a89ae341b7a72eb75811cec31ee..e6f378c05daf05ef7824d91eddddae5c3e00c450 100644 (file)
 
 #include "access/genam.h"
 #include "executor/executor.h"
+#include "executor/instrument.h"
 #include "executor/nodeBitmapIndexscan.h"
 #include "executor/nodeIndexscan.h"
 #include "miscadmin.h"
+#include "nodes/tidbitmap.h"
 
 
 /* ----------------------------------------------------------------
index dcd7ceb29727d3405794bea617202e070b6c0e19..148c80fdae6157d6f74d5e5ef806e96e5587648c 100644 (file)
@@ -29,7 +29,9 @@
 #include "postgres.h"
 
 #include "executor/executor.h"
+#include "executor/instrument.h"
 #include "executor/nodeBitmapOr.h"
+#include "nodes/tidbitmap.h"
 #include "miscadmin.h"
 
 
index 45b09d93b937e5a7f1ad5d14edb1357704cbc2e1..d3a8551e801fd5f3279287eb46ef3756377967fa 100644 (file)
@@ -18,6 +18,7 @@
 #include "executor/executor.h"
 #include "executor/nodeCtescan.h"
 #include "miscadmin.h"
+#include "utils/tuplestore.h"
 
 static TupleTableSlot *CteScanNext(CteScanState *node);
 
index 222741adf3b33cb6685b88e5b33aeeefb4ec0d5a..1416f1f09ae5e460a12c55ec91e29748832debbc 100644 (file)
@@ -27,6 +27,7 @@
 #include "funcapi.h"
 #include "nodes/nodeFuncs.h"
 #include "utils/memutils.h"
+#include "utils/tuplestore.h"
 
 
 /*
index ae2121941828fab9cd10ab86ac86a6b30affa01c..c2ac5e0792cbaa624e2ad36bc91527b8a1c5a5c2 100644 (file)
@@ -22,6 +22,7 @@
 #include "lib/binaryheap.h"
 #include "miscadmin.h"
 #include "optimizer/optimizer.h"
+#include "utils/sortsupport.h"
 
 /*
  * When we read tuples from workers, it's a good idea to read several at once
index 1cd84011567f5ac6b2d048f5dd7a422f0239dcae..3699d8a374659f0701f2a883a35324ea0a161d9b 100644 (file)
@@ -23,6 +23,7 @@
 #include "postgres.h"
 
 #include "executor/executor.h"
+#include "executor/instrument.h"
 #include "executor/nodeGroup.h"
 #include "miscadmin.h"
 
index c0eb5a1f0c52724b29eb85c33f73da0b24d978cd..f7fd6474db80f7a08eb5b45885dacc97226181ce 100644 (file)
@@ -32,6 +32,7 @@
 #include "commands/tablespace.h"
 #include "executor/executor.h"
 #include "executor/hashjoin.h"
+#include "executor/instrument.h"
 #include "executor/nodeHash.h"
 #include "executor/nodeHashjoin.h"
 #include "miscadmin.h"
index 5aa8a09b26523580083de74a0e989aa94d8390ea..fe96bd556ef71a90e66715d22a6616e05b61697c 100644 (file)
 #include "access/parallel.h"
 #include "executor/executor.h"
 #include "executor/hashjoin.h"
+#include "executor/instrument.h"
 #include "executor/nodeHash.h"
 #include "executor/nodeHashjoin.h"
 #include "miscadmin.h"
index bdd836e0fb1213e043474920a6a60cb09130daec..c8db357e69f5377fd0fe611f8114a5727ab8c3e1 100644 (file)
@@ -37,6 +37,7 @@
 #include "access/visibilitymap.h"
 #include "catalog/pg_type.h"
 #include "executor/executor.h"
+#include "executor/instrument.h"
 #include "executor/nodeIndexonlyscan.h"
 #include "executor/nodeIndexscan.h"
 #include "miscadmin.h"
index 36c00d0e20cd1cfb839e083c71dfa9c4dcb8c1fb..bd83e4712b320c3de77f2dd48fb477fc539cb4bb 100644 (file)
@@ -34,6 +34,7 @@
 #include "access/tableam.h"
 #include "catalog/pg_am.h"
 #include "executor/executor.h"
+#include "executor/instrument.h"
 #include "executor/nodeIndexscan.h"
 #include "lib/pairingheap.h"
 #include "miscadmin.h"
@@ -42,6 +43,7 @@
 #include "utils/datum.h"
 #include "utils/lsyscache.h"
 #include "utils/rel.h"
+#include "utils/sortsupport.h"
 
 /*
  * When an ordering operator is used, tuples fetched from the index that
index 764032df6c64fcec3d4771d69f6b170a04f0170a..e5f387612bcde4b904a513e59d64a08de4ff2039 100644 (file)
@@ -24,6 +24,7 @@
 #include "executor/executor.h"
 #include "executor/nodeMaterial.h"
 #include "miscadmin.h"
+#include "utils/tuplestore.h"
 
 /* ----------------------------------------------------------------
  *             ExecMaterial
index 30bfeaf7c137afaafe392a14c198f4ca8611a360..72eebd50bdf8300150bb949de615de0a5856ed03 100644 (file)
@@ -43,6 +43,7 @@
 #include "executor/nodeMergeAppend.h"
 #include "lib/binaryheap.h"
 #include "miscadmin.h"
+#include "utils/sortsupport.h"
 
 /*
  * We have one slot for each item in the heap array.  We use SlotNumber
index cbcae4c70b85a9c8c3514b42ffaea737950621b0..f8421a74c75c4fc269cd9f7ed802232f961854a4 100644 (file)
 
 #include "access/nbtree.h"
 #include "executor/execdebug.h"
+#include "executor/instrument.h"
 #include "executor/nodeMergejoin.h"
 #include "miscadmin.h"
 #include "utils/lsyscache.h"
+#include "utils/sortsupport.h"
 
 
 /*
index 327c27abff9c87b59ba05f1ef4022b7a015dbd73..4cd5e262e0f33039b4071ca7c3d796caf9bf4760 100644 (file)
 
 #include "access/htup_details.h"
 #include "access/tableam.h"
+#include "access/tupconvert.h"
 #include "access/xact.h"
 #include "commands/trigger.h"
 #include "executor/execPartition.h"
 #include "executor/executor.h"
+#include "executor/instrument.h"
 #include "executor/nodeModifyTable.h"
 #include "foreign/fdwapi.h"
 #include "miscadmin.h"
index 29d862a4001cdcd2388a5bf225a11d4a94cc4506..4c94674cecad324ac6dfb499f8afe85ae0e51146 100644 (file)
@@ -18,6 +18,7 @@
 #include "executor/executor.h"
 #include "executor/nodeNamedtuplestorescan.h"
 #include "utils/queryenvironment.h"
+#include "utils/tuplestore.h"
 
 static TupleTableSlot *NamedTuplestoreScanNext(NamedTuplestoreScanState *node);
 
index df3f6328ade35b7b3e4fd304169fa291ad5b6604..809311ab513305260b64201b3f8df98ec929197d 100644 (file)
@@ -22,6 +22,7 @@
 #include "postgres.h"
 
 #include "executor/execdebug.h"
+#include "executor/instrument.h"
 #include "executor/nodeNestloop.h"
 #include "miscadmin.h"
 
index 5098ddeabb6da1e4e7805de250f1754241137077..7166397e59b9611d054c6acb5b5aa2ec801fea8f 100644 (file)
@@ -22,6 +22,7 @@
 #include "executor/nodeRecursiveunion.h"
 #include "miscadmin.h"
 #include "utils/memutils.h"
+#include "utils/tuplestore.h"
 
 
 
index 24cd713b12cf400af5bf7c936e2f4692c9e3e6b9..24709778384b5ce5b354f0883a79fa978dda3ec8 100644 (file)
@@ -50,6 +50,7 @@
 #include "executor/nodeSetOp.h"
 #include "miscadmin.h"
 #include "utils/memutils.h"
+#include "utils/sortsupport.h"
 
 
 /*
index 769b976654232a05847115ac8dcd2bb8729a7651..9394156f40549283f421af7288e75812cd69e71b 100644 (file)
@@ -31,6 +31,7 @@
 #include "utils/jsonpath.h"
 #include "utils/lsyscache.h"
 #include "utils/memutils.h"
+#include "utils/tuplestore.h"
 #include "utils/xml.h"
 
 static TupleTableSlot *TableFuncNext(TableFuncScanState *node);
index d9b64b0f4657c68c4e2657175cd32b4646ecce83..784ceeb824686af004c84d9a29668d951d0a7e9e 100644 (file)
@@ -38,6 +38,7 @@
 #include "catalog/pg_aggregate.h"
 #include "catalog/pg_proc.h"
 #include "executor/executor.h"
+#include "executor/instrument.h"
 #include "executor/nodeWindowAgg.h"
 #include "miscadmin.h"
 #include "nodes/nodeFuncs.h"
@@ -53,6 +54,7 @@
 #include "utils/memutils.h"
 #include "utils/regproc.h"
 #include "utils/syscache.h"
+#include "utils/tuplestore.h"
 #include "windowapi.h"
 
 /*
index 66e904c7636655254d3a7e1547048b0cbc8c893d..bbceb9b9437abd8888e7907257bda6973efaca92 100644 (file)
@@ -17,6 +17,7 @@
 
 #include "executor/executor.h"
 #include "executor/nodeWorktablescan.h"
+#include "utils/tuplestore.h"
 
 static TupleTableSlot *WorkTableScanNext(WorkTableScanState *node);
 
index 3019a3b2b970729c7fbdd954f17d3a1fd7aa517f..52f3b11301c559d3c9b18be45c9ba708db877df9 100644 (file)
@@ -32,6 +32,7 @@
 #include "utils/rel.h"
 #include "utils/snapmgr.h"
 #include "utils/syscache.h"
+#include "utils/tuplestore.h"
 #include "utils/typcache.h"
 
 
index 160cf6f51c9d7fd7253cdef354ea1f7bf91f56a4..2edfac68d9b1651e70491f35cc45120e7ddee8cf 100644 (file)
@@ -28,6 +28,7 @@
 #include "utils/memutils.h"
 #include "utils/rel.h"
 #include "utils/syscache.h"
+#include "utils/tuplestore.h"
 #include "utils/varlena.h"
 
 
index e92be36932ba09d6a4e5cf4c0942ec72d1b37166..fd930bdca3a072dfa93921fde91f601fe08a9219 100644 (file)
@@ -26,6 +26,7 @@
 #include "miscadmin.h"
 #include "nodes/execnodes.h"
 #include "portability/instr_time.h"
+#include "storage/fd.h"
 #include "utils/fmgrprotos.h"
 
 /* GUCs */
index 89ca4e08bf156044bde234b1a56893e4de3150c2..56d45287c8962faf4f019682e4c573a2b06d6d5a 100644 (file)
@@ -95,6 +95,7 @@
 #include "miscadmin.h"
 #include "nodes/makefuncs.h"
 #include "nodes/nodeFuncs.h"
+#include "nodes/tidbitmap.h"
 #include "optimizer/clauses.h"
 #include "optimizer/cost.h"
 #include "optimizer/optimizer.h"
index 9aaf1c4e5ca2dd96e62c6ef4b657c2c1951035e4..c20e7e49780bb6fc84e5ce61c5718cea3101a1f1 100644 (file)
@@ -15,6 +15,7 @@
 #include "postgres.h"
 
 #include "access/nbtree.h"
+#include "access/sysattr.h"
 #include "catalog/pg_constraint.h"
 #include "catalog/pg_type.h"
 #include "nodes/makefuncs.h"
index ff9c7c4fb96be188ba54fde170e6d921ea72a0a2..1647066a13d7a57ca193cd2478c2135833230f2f 100644 (file)
@@ -36,7 +36,9 @@
 
 #include "postgres.h"
 
+#include "access/sysattr.h"
 #include "access/table.h"
+#include "catalog/pg_type_d.h"
 #include "nodes/makefuncs.h"
 #include "optimizer/appendinfo.h"
 #include "optimizer/optimizer.h"
index f50c296e3d9677533f75b0d10382f3ae0f04c1e7..583cb0b7a2553c95e6cebda55fa09372f6738074 100644 (file)
@@ -37,6 +37,7 @@
 #include "optimizer/prep.h"
 #include "optimizer/tlist.h"
 #include "parser/parse_coerce.h"
+#include "port/pg_bitutils.h"
 #include "utils/selfuncs.h"
 
 
index eadecd0bb92f7020e584a13e773b43a97ded5d50..778e4662f6e94fcb4869a8bafbe99b3e04a3f8f5 100644 (file)
@@ -15,6 +15,7 @@
 #include "postgres.h"
 
 #include "access/htup_details.h"
+#include "access/sysattr.h"
 #include "access/table.h"
 #include "foreign/fdwapi.h"
 #include "nodes/makefuncs.h"
index fe15881af4e16f686ce1115d000443d5b4b7ee94..690a23d619aaba90263e5e56164d2251623ce3ac 100644 (file)
@@ -25,6 +25,7 @@
 #include "nodes/pathnodes.h"
 #include "optimizer/optimizer.h"
 #include "utils/array.h"
+#include "utils/hsearch.h"
 #include "utils/inval.h"
 #include "utils/lsyscache.h"
 #include "utils/syscache.h"
index cc244c49e9e0f7622d3a71b65f1df94d46ed08d0..9a918e14aa705a1b98e3c70413fa0f61c719ea77 100644 (file)
@@ -23,6 +23,7 @@
 #include "postgres.h"
 
 #include "access/amapi.h"
+#include "access/attmap.h"
 #include "access/htup_details.h"
 #include "access/relation.h"
 #include "access/reloptions.h"
index 695e187ba115dad2f47dc8efa47aa9c5889e7a96..219673db93053422d3d257b308c1177583c14ed5 100644 (file)
@@ -90,6 +90,7 @@
 #include "storage/aio_subsys.h"
 #include "storage/bufmgr.h"
 #include "storage/ipc.h"
+#include "storage/fd.h"
 #include "storage/latch.h"
 #include "storage/lmgr.h"
 #include "storage/pmsignal.h"
index 033858752d978e06f55000f972a1b2668e4f357c..2d7708805a6886bbab26172e179bf374b3aae0f8 100644 (file)
 #include "access/commit_ts.h"
 #include "access/table.h"
 #include "access/tableam.h"
+#include "access/tupconvert.h"
 #include "access/twophase.h"
 #include "access/xact.h"
 #include "catalog/indexing.h"
 #include "optimizer/optimizer.h"
 #include "parser/parse_relation.h"
 #include "pgstat.h"
+#include "port/pg_bitutils.h"
 #include "postmaster/bgworker.h"
 #include "postmaster/interrupt.h"
 #include "postmaster/walwriter.h"
index bbf3316dfd18f1ba88eb5208bbf441181196ec80..06f2f3442d88e2ab4dfbd335e05e6a8420673946 100644 (file)
@@ -14,6 +14,7 @@
 #include "postgres.h"
 
 #include "access/genam.h"
+#include "access/sysattr.h"
 #include "access/table.h"
 #include "access/htup_details.h"
 #include "catalog/pg_operator.h"
index 6fa174412f2436a884f652b5f5171b14ca02e312..fe89754a73ce4d4487533005d1ef4a102df7c0c0 100644 (file)
@@ -13,6 +13,7 @@
  */
 #include "postgres.h"
 
+#include "access/attmap.h"
 #include "catalog/pg_type.h"
 #include "nodes/makefuncs.h"
 #include "nodes/nodeFuncs.h"
index 068c1577b128a7ffdbc8671712be1c4b43fefe93..9bfcd6168277ce2810951fd7cf2aae68ab3bcc41 100644 (file)
@@ -47,6 +47,7 @@
 #include "storage/shmem.h"
 #include "utils/builtins.h"
 #include "utils/memutils.h"
+#include "utils/tuplestore.h"
 
 typedef struct DSMRegistryCtxStruct
 {
index 55e4a5421de519430db7139b8896346f3c42cfad..0424c44572375b94e21831373bed1b49473588b6 100644 (file)
@@ -65,6 +65,8 @@
 
 #include "postgres.h"
 
+#include <unistd.h>
+
 #include "common/int.h"
 #include "fmgr.h"
 #include "funcapi.h"
@@ -75,6 +77,7 @@
 #include "storage/shmem.h"
 #include "storage/spin.h"
 #include "utils/builtins.h"
+#include "utils/tuplestore.h"
 
 /*
  * This is the first data structure stored in the shared memory segment, at
index d01a09dd0c417e5eb6fbe74752b3d56a07b93418..b3563113219149ab0acbcfb7b34951b9739056cf 100644 (file)
@@ -63,6 +63,7 @@
 #include "rewrite/rewriteHandler.h"
 #include "storage/bufmgr.h"
 #include "storage/ipc.h"
+#include "storage/fd.h"
 #include "storage/pmsignal.h"
 #include "storage/proc.h"
 #include "storage/procsignal.h"
index fa10a80b0887652c2f7842afba044e537c65de7c..ff683ae8c5ddfa9f17a30ca155c30a4afa012e22 100644 (file)
@@ -16,6 +16,7 @@
 
 #include "funcapi.h"
 #include "utils/builtins.h"
+#include "utils/tuplestore.h"
 #include "utils/wait_event.h"
 
 /*
index 7ab91fbb06dac5b970bb0dd09730b625d9d3adf0..b9190e700dc55f6ee6c1ba8ac09a2e6600f8a0d0 100644 (file)
@@ -40,6 +40,7 @@
 #include "lib/bloomfilter.h"
 #include "lib/qunique.h"
 #include "miscadmin.h"
+#include "port/pg_bitutils.h"
 #include "storage/large_object.h"
 #include "utils/acl.h"
 #include "utils/array.h"
index 63c78ed12cda1928b7ab6f452dbcb154978f040b..2bf9e9509fb358aa7abee6331f329d08e17055d9 100644 (file)
@@ -14,6 +14,7 @@
  */
 #include "postgres.h"
 
+#include "catalog/pg_type_d.h"
 #include "executor/execExpr.h"
 #include "nodes/makefuncs.h"
 #include "nodes/nodeFuncs.h"
index 90946db72ff5923283a4c2e622b130d8357cf8f6..8f25c15fcfc3332d4e467e025939f3bf231fa735 100644 (file)
@@ -30,6 +30,7 @@
 #include "utils/date.h"
 #include "utils/datetime.h"
 #include "utils/guc.h"
+#include "utils/tuplestore.h"
 #include "utils/tzparser.h"
 
 static int     DecodeNumber(int flen, char *str, bool haveTextMonth,
index e7432c447e7650de4d1609c494798c09cf916fa9..fdce3ed79279e1c64e36a51983b63ebde301ca7e 100644 (file)
@@ -22,6 +22,7 @@
 #include "utils/array.h"
 #include "utils/builtins.h"
 #include "utils/guc.h"
+#include "utils/tuplestore.h"
 
 
 static ArrayType *get_hba_options(HbaLine *hba);
index 0b16139846535f0d55baa0cf8f23a9533eb64b45..ab38ddb907927f6e34fddfa3d94b3be8ac766476 100644 (file)
@@ -26,6 +26,7 @@
 #include "utils/date.h"
 #include "utils/datetime.h"
 #include "utils/fmgroids.h"
+#include "utils/hsearch.h"
 #include "utils/json.h"
 #include "utils/jsonfuncs.h"
 #include "utils/lsyscache.h"
index 6bf55f19d6a0c2c3d53fa2bd76c2fd222887f0fd..f2745b29a3ff30fbbe459c91c54b8753de8a223f 100644 (file)
@@ -14,6 +14,7 @@
  */
 #include "postgres.h"
 
+#include "catalog/pg_type_d.h"
 #include "executor/execExpr.h"
 #include "nodes/nodeFuncs.h"
 #include "nodes/subscripting.h"
index d5b64d7fca5688caae496d05d41895d8e381e0d9..efdf60ca5a54d0fdab21d97eafc5d3326d484376 100644 (file)
@@ -38,6 +38,7 @@
 #include "utils/lsyscache.h"
 #include "utils/memutils.h"
 #include "utils/syscache.h"
+#include "utils/tuplestore.h"
 #include "utils/typcache.h"
 
 /* Operations available for setPath */
index c7f7b8bc2dd160230880cb0ced2c072ad4a2168c..1a4dbbeb8db8ff7ee20b3869e36a85b6096ff86c 100644 (file)
@@ -15,6 +15,7 @@
 
 #include "postgres.h"
 
+#include "catalog/pg_type_d.h"
 #include "funcapi.h"
 #include "mb/pg_wchar.h"
 #include "storage/proc.h"
@@ -23,6 +24,7 @@
 #include "utils/array.h"
 #include "utils/builtins.h"
 #include "utils/hsearch.h"
+#include "utils/tuplestore.h"
 
 /* ----------
  * The max bytes for showing identifiers of MemoryContext.
index 864032c32bfbbfee6db008d70f24a241d1954dab..29ef800d9923ffca88c1a1ade177688dedac1a76 100644 (file)
@@ -46,6 +46,7 @@
 #include "utils/ruleutils.h"
 #include "utils/syscache.h"
 #include "utils/timestamp.h"
+#include "utils/tuplestore.h"
 #include "utils/wait_event.h"
 
 
index bad5642d9c902d3e77b79ab5896a399d5c8230b0..5f9073359903bfdbb5888e7790cb164b38531ff7 100644 (file)
@@ -31,6 +31,7 @@
 #include "utils/acl.h"
 #include "utils/builtins.h"
 #include "utils/timestamp.h"
+#include "utils/tuplestore.h"
 #include "utils/wait_event.h"
 
 #define UINT32_ACCESS_ONCE(var)                 ((uint32)(*((volatile uint32 *)&(var))))
index 06cc3af4f4ac868d05ab1d4e60a55f7847a5c380..92dacd73dec46054d1ebbf384deaaaee8032dbde 100644 (file)
@@ -30,6 +30,7 @@
  */
 #include "postgres.h"
 
+#include "access/tupmacs.h"
 #include "common/hashfn.h"
 #include "funcapi.h"
 #include "libpq/pqformat.h"
@@ -40,6 +41,7 @@
 #include "optimizer/clauses.h"
 #include "optimizer/cost.h"
 #include "optimizer/optimizer.h"
+#include "port/pg_bitutils.h"
 #include "utils/builtins.h"
 #include "utils/date.h"
 #include "utils/lsyscache.h"
index 7caf700fd619849d3a2a5c60ce13be1a6ccdcaa5..7b1ee61bde60142c2bbe2059308698267b7e1de9 100644 (file)
@@ -19,6 +19,7 @@
 
 #include "access/detoast.h"
 #include "access/toast_compression.h"
+#include "access/tupmacs.h"
 #include "catalog/pg_collation.h"
 #include "catalog/pg_type.h"
 #include "common/hashfn.h"
@@ -40,6 +41,7 @@
 #include "utils/memutils.h"
 #include "utils/pg_locale.h"
 #include "utils/sortsupport.h"
+#include "utils/tuplestore.h"
 #include "utils/varlena.h"
 
 typedef varlena VarString;
index 597de687b45d34baf24ffca3cdc041ec66605f65..3a4f19e8d58519a511a47e16edc09935d73076c8 100644 (file)
@@ -75,6 +75,7 @@
 #include "pgstat.h"
 #include "rewrite/rewriteDefine.h"
 #include "rewrite/rowsecurity.h"
+#include "storage/fd.h"
 #include "storage/lmgr.h"
 #include "storage/smgr.h"
 #include "utils/array.h"
index 4e26df7c63a0c5c5bdd5c682759a34aa8cbe3539..bfeceb7a92fc8db67d29f57877a58c5469047ae7 100644 (file)
@@ -31,6 +31,7 @@
 #include "utils/builtins.h"
 #include "utils/fmgrtab.h"
 #include "utils/guc.h"
+#include "utils/hsearch.h"
 #include "utils/lsyscache.h"
 #include "utils/syscache.h"
 
index b59e08605cc795ef7ff555df5d5c92c4688a1082..26118661f07acf08d604450f92d1eda2d647abdc 100644 (file)
@@ -38,6 +38,7 @@
 #include "mb/pg_wchar.h"
 #include "miscadmin.h"
 #include "pgstat.h"
+#include "port/pg_bitutils.h"
 #include "postmaster/autovacuum.h"
 #include "postmaster/postmaster.h"
 #include "replication/slot.h"
index 472cb5393ce6328cf4930ef5807e0a9289c8a965..e2c2919484e6351d4c56a5e265b6c38d4a5a5d93 100644 (file)
@@ -22,6 +22,7 @@
 #include "catalog/objectaccess.h"
 #include "catalog/pg_authid.h"
 #include "catalog/pg_parameter_acl.h"
+#include "catalog/pg_type_d.h"
 #include "funcapi.h"
 #include "guc_internal.h"
 #include "miscadmin.h"
@@ -30,6 +31,7 @@
 #include "utils/builtins.h"
 #include "utils/guc_tables.h"
 #include "utils/snapmgr.h"
+#include "utils/tuplestore.h"
 
 static char *flatten_set_variable_args(const char *name, List *args);
 static void ShowGUCConfigOption(const char *name, DestReceiver *dest);
index 210e3a50ff9cf2e22c6b4adb2e6196ac60a761e2..1d9d7985cf1ee1a17ab1215b70a929169392801b 100644 (file)
@@ -18,6 +18,7 @@
 #include "funcapi.h"
 #include "miscadmin.h"
 #include "utils/builtins.h"
+#include "utils/tuplestore.h"
 
 Datum
 pg_config(PG_FUNCTION_ARGS)
index c1a53e658cb292b747f0ac90ebdba6ecba8604e4..493f9b0ee19120d7f5609e8314eb002c84706bd1 100644 (file)
 #include "miscadmin.h"
 #include "storage/ipc.h"
 #include "utils/builtins.h"
+#include "utils/hsearch.h"
 #include "utils/memutils.h"
 #include "utils/snapmgr.h"
 #include "utils/timestamp.h"
+#include "utils/tuplestore.h"
 
 /*
  * Estimate of the maximum number of open portals a user would have,
index afba82f28a299d95792868613c49a56005518bf5..273a4c9b02f51a171ae3e63fabe4bd2b47a34a10 100644 (file)
@@ -63,6 +63,7 @@
 #include "storage/buffile.h"
 #include "utils/memutils.h"
 #include "utils/resowner.h"
+#include "utils/tuplestore.h"
 
 
 /*
index 4c0429cc613b66cd97dfa22d5a808e3a2f76c765..1a27bf060b30e7cc4757ea836c935cec57b495be 100644 (file)
 #include "access/sdir.h"
 #include "access/skey.h"
 #include "executor/instrument_node.h"
-#include "nodes/tidbitmap.h"
 #include "storage/buf.h"
 #include "storage/lockdefs.h"
 #include "utils/snapshot.h"
 
-/* We don't want this file to depend on execnodes.h. */
+
+/*
+ * forward references in this file
+ */
 typedef struct IndexInfo IndexInfo;
+typedef struct RelationData *Relation;
+typedef struct TIDBitmap TIDBitmap;
 typedef struct TupleTableSlot TupleTableSlot;
 
-/* or relcache.h */
-typedef struct RelationData *Relation;
 
 /*
  * Struct for statistics returned by ambuild
index 7c3b4db94cd6a04eef580ea6517cc7040563c83d..4445d088fa0c344072168a496e00187b810caab4 100644 (file)
@@ -19,6 +19,7 @@
 #include "catalog/pg_am_d.h"
 #include "fmgr.h"
 #include "lib/rbtree.h"
+#include "nodes/tidbitmap.h"
 #include "storage/bufmgr.h"
 
 /*
index e967b2b18857140a8529054dc327e12dca9dd801..c0bba03a5ee9477290fef08f266b7abfb4b2448d 100644 (file)
@@ -14,6 +14,7 @@
 #ifndef BOOTSTRAP_H
 #define BOOTSTRAP_H
 
+#include "catalog/pg_attribute.h"
 #include "nodes/execnodes.h"
 #include "nodes/parsenodes.h"
 
index b259c4141edcd98a5b1da3820d012bb514ae68a5..36b7068925440ab6782ccbc7e3021022eb36bb59 100644 (file)
 #include "nodes/execnodes.h"
 
 
+/*
+ * forward references in this file
+ */
+typedef struct AttrMap AttrMap;
+
+
 #define DEFAULT_INDEX_TYPE     "btree"
 
 /* Action code for index_set_state_flags */
index 86226f8db70bd81cad6e00e46bad5a28b9490a8e..472e141bba3ffd8f73e29f4c2c3fb770b5e10d69 100644 (file)
@@ -14,6 +14,7 @@
 #define EXPLAIN_H
 
 #include "executor/executor.h"
+#include "executor/instrument.h"
 #include "parser/parse_node.h"
 
 typedef struct ExplainState ExplainState;      /* defined in explain_state.h */
index 0b695f7d8126b4a8c9c7f55cae0a2659040c9d1e..5a48bc6fbb179f56a5c10b50c61b4bd87b1495a0 100644 (file)
@@ -16,6 +16,7 @@
 #include "nodes/parsenodes.h"
 #include "nodes/plannodes.h"
 #include "parser/parse_node.h"
+#include "port/pg_bitutils.h"
 
 typedef enum ExplainSerializeOption
 {
index 028edb8d9fd1329235eed50ffcccd0cc6b9bdfeb..18b03235c3c4a2b4a62e0149485beb8c375bf2bc 100644 (file)
@@ -15,6 +15,7 @@
 
 #include "miscadmin.h"
 #include "executor/executor.h"
+#include "executor/instrument.h"
 #include "nodes/execnodes.h"
 
 /*
index b18206535064097a57c8cfe8b4f28350c66504a8..064df01811e878d74da1b599e9293c30d587e66f 100644 (file)
@@ -14,6 +14,7 @@
 #ifndef EXECUTOR_H
 #define EXECUTOR_H
 
+#include "access/xlogdefs.h"
 #include "datatype/timestamp.h"
 #include "executor/execdesc.h"
 #include "fmgr.h"
index 781ba266a8bfe3f28f634bbc17345ee6030c0e2b..9cc82cdea4b6f6f59f98e4d704108118ff33b547 100644 (file)
@@ -19,6 +19,8 @@
 #include "storage/barrier.h"
 #include "storage/buffile.h"
 #include "storage/lwlock.h"
+#include "utils/dsa.h"
+#include "utils/sharedtuplestore.h"
 
 /* ----------------------------------------------------------------
  *                             hash-join hash table structures
index 848719232a4d4345ad863e0c6dc217588b06f750..15af488abfb2cd340081f3bb03e66b81a2095957 100644 (file)
@@ -93,7 +93,6 @@
  * src/include/lib/simplehash.h
  */
 
-#include "port/pg_bitutils.h"
 
 /* helpers */
 #define SH_MAKE_PREFIX(a) CppConcat(a,_)
@@ -255,6 +254,8 @@ SH_SCOPE void SH_STAT(SH_TYPE * tb);
 /* generate implementation of the hash table */
 #ifdef SH_DEFINE
 
+#include "port/pg_bitutils.h"
+
 #ifndef SH_RAW_ALLOCATOR
 #include "utils/memutils.h"
 #endif
index 63c067d5aae614c4127186f663700da030551acc..0716c5a9aed3f3c6d9c76f509fc0976e74cba403 100644 (file)
 #ifndef EXECNODES_H
 #define EXECNODES_H
 
-#include "access/skey.h"
-#include "access/tupconvert.h"
-#include "executor/instrument.h"
+#include "access/htup.h"
 #include "executor/instrument_node.h"
 #include "fmgr.h"
 #include "lib/ilist.h"
-#include "lib/pairingheap.h"
 #include "nodes/miscnodes.h"
 #include "nodes/params.h"
 #include "nodes/plannodes.h"
-#include "nodes/tidbitmap.h"
 #include "partitioning/partdefs.h"
-#include "storage/condition_variable.h"
-#include "utils/hsearch.h"
-#include "utils/queryenvironment.h"
+#include "storage/buf.h"
 #include "utils/reltrigger.h"
-#include "utils/sharedtuplestore.h"
-#include "utils/snapshot.h"
-#include "utils/sortsupport.h"
-#include "utils/tuplesort.h"
-#include "utils/tuplestore.h"
+
 
 /*
  * forward references in this file
  */
-typedef struct PlanState PlanState;
+typedef struct BufferUsage BufferUsage;
 typedef struct ExecRowMark ExecRowMark;
 typedef struct ExprState ExprState;
 typedef struct ExprContext ExprContext;
+typedef struct HTAB HTAB;
+typedef struct Instrumentation Instrumentation;
+typedef struct pairingheap pairingheap;
+typedef struct PlanState PlanState;
+typedef struct QueryEnvironment QueryEnvironment;
+typedef struct RelationData *Relation;
+typedef Relation *RelationPtr;
+typedef struct ScanKeyData ScanKeyData;
+typedef struct SnapshotData *Snapshot;
+typedef struct SortSupportData *SortSupport;
+typedef struct TIDBitmap TIDBitmap;
+typedef struct TupleConversionMap TupleConversionMap;
+typedef struct TupleDescData *TupleDesc;
+typedef struct Tuplesortstate Tuplesortstate;
+typedef struct Tuplestorestate Tuplestorestate;
+typedef struct TupleTableSlot TupleTableSlot;
+typedef struct TupleTableSlotOps TupleTableSlotOps;
+typedef struct WalUsage WalUsage;
+typedef struct WorkerInstrumentation WorkerInstrumentation;
 
 
 /* ----------------
@@ -1819,41 +1828,6 @@ typedef struct BitmapIndexScanState
        SharedIndexScanInstrumentation *biss_SharedInfo;
 } BitmapIndexScanState;
 
-/* ----------------
- *      SharedBitmapState information
- *
- *             BM_INITIAL              TIDBitmap creation is not yet started, so first worker
- *                                             to see this state will set the state to BM_INPROGRESS
- *                                             and that process will be responsible for creating
- *                                             TIDBitmap.
- *             BM_INPROGRESS   TIDBitmap creation is in progress; workers need to
- *                                             sleep until it's finished.
- *             BM_FINISHED             TIDBitmap creation is done, so now all workers can
- *                                             proceed to iterate over TIDBitmap.
- * ----------------
- */
-typedef enum
-{
-       BM_INITIAL,
-       BM_INPROGRESS,
-       BM_FINISHED,
-} SharedBitmapState;
-
-/* ----------------
- *      ParallelBitmapHeapState information
- *             tbmiterator                             iterator for scanning current pages
- *             mutex                                   mutual exclusion for state
- *             state                                   current state of the TIDBitmap
- *             cv                                              conditional wait variable
- * ----------------
- */
-typedef struct ParallelBitmapHeapState
-{
-       dsa_pointer tbmiterator;
-       slock_t         mutex;
-       SharedBitmapState state;
-       ConditionVariable cv;
-} ParallelBitmapHeapState;
 
 /* ----------------
  *      BitmapHeapScanState information
@@ -1867,6 +1841,10 @@ typedef struct ParallelBitmapHeapState
  *             recheck                    do current page's tuples need recheck
  * ----------------
  */
+
+/* this struct is defined in nodeBitmapHeapscan.c */
+typedef struct ParallelBitmapHeapState ParallelBitmapHeapState;
+
 typedef struct BitmapHeapScanState
 {
        ScanState       ss;                             /* its first field is NodeTag */
index 8c9321aab8cb77bd598afb01f94f214b1f5a1ee7..b6185825fcb388125b32b091ec2fbd40686b5c7c 100644 (file)
@@ -16,8 +16,6 @@
 
 #include "access/sdir.h"
 #include "access/stratnum.h"
-#include "common/relpath.h"
-#include "lib/stringinfo.h"
 #include "nodes/bitmapset.h"
 #include "nodes/lockoptions.h"
 #include "nodes/primnodes.h"
index 02eced3b2c532200a4243014e4613242d9558019..c5f11b874c7d928669a9d0d0c63bfa4e2e5bd326 100644 (file)
@@ -35,6 +35,7 @@
 #include "utils/memutils.h"
 #include "utils/rel.h"
 #include "utils/syscache.h"
+#include "utils/tuplestore.h"
 #include "utils/typcache.h"
 
 /* define our text domain for translations */
index b7318f7261eee324218f607fa8872adbc4695abe..44491de669a81dc43a5a3bab60aa5379f1cb7e42 100644 (file)
@@ -36,6 +36,7 @@
 #include "utils/regproc.h"
 #include "utils/rel.h"
 #include "utils/syscache.h"
+#include "utils/tuplestore.h"
 #include "utils/typcache.h"
 
 
index 3de0491e0ec4e5a7859f33437c196e52d51d3c64..d59c5ad05823b19455d487b16fd171e855a6de87 100644 (file)
@@ -31,6 +31,7 @@
 #include "utils/guc.h"
 #include "utils/injection_point.h"
 #include "utils/memutils.h"
+#include "utils/tuplestore.h"
 #include "utils/wait_event.h"
 
 PG_MODULE_MAGIC;
index da28afbd9291b3b118a06aaf9ec1f1c10300ee39..2ef0e903745bbd83df8b679502adfef2736f9651 100644 (file)
@@ -16,6 +16,7 @@
 #include "common/hashfn.h"
 #include "funcapi.h"
 #include "storage/dsm_registry.h"
+#include "storage/fd.h"
 #include "utils/builtins.h"
 #include "utils/pgstat_internal.h"
 
index 380b3e754b7ad7a9eb943ba9be12f195513f0f1c..64a1dfa9f793eb02499b911596e6a037fb51dc1e 100644 (file)
@@ -15,6 +15,7 @@
 #include "tcop/deparse_utility.h"
 #include "tcop/utility.h"
 #include "utils/builtins.h"
+#include "utils/tuplestore.h"
 
 PG_MODULE_MAGIC;
 
index 4e97cde65a6fc49ff5aa1429c99bbf6ce04b7c94..cfe569aa0602c32c5deebdd9907bf96eb5e6df6f 100644 (file)
@@ -14,6 +14,7 @@
 
 #include "postgres.h"
 
+#include "catalog/pg_type_d.h"
 #include "funcapi.h"
 #include "regex/regex.h"
 #include "utils/array.h"