Browse Source

Make the order of the header file includes consistent in backend modules.

Similar to commits 7e735035f2 and dddf4cdc33, this commit makes the order
of header file inclusion consistent for backend modules.

In the passing, removed a couple of duplicate inclusions.

Author: Vignesh C
Reviewed-by: Kuntal Ghosh and Amit Kapila
Discussion: https://postgr.es/m/CALDaNm2Sznv8RR6Ex-iJO6xAdsxgWhCoETkaYX=+9DW3q0QCfA@mail.gmail.com
master
Amit Kapila 3 weeks ago
parent
commit
14aec03502
100 changed files with 156 additions and 260 deletions
  1. +2
    -3
      src/backend/access/brin/brin_minmax.c
  2. +1
    -2
      src/backend/access/brin/brin_pageops.c
  3. +1
    -2
      src/backend/access/brin/brin_tuple.c
  4. +1
    -2
      src/backend/access/brin/brin_validate.c
  5. +1
    -1
      src/backend/access/gin/ginbtree.c
  6. +5
    -5
      src/backend/access/gin/ginfast.c
  7. +2
    -3
      src/backend/access/gin/gininsert.c
  8. +1
    -2
      src/backend/access/gin/ginvalidate.c
  9. +1
    -2
      src/backend/access/gist/gist.c
  10. +2
    -2
      src/backend/access/gist/gistget.c
  11. +2
    -3
      src/backend/access/gist/gistutil.c
  12. +0
    -2
      src/backend/access/hash/hash.c
  13. +3
    -3
      src/backend/access/hash/hash_xlog.c
  14. +2
    -2
      src/backend/access/hash/hashinsert.c
  15. +1
    -2
      src/backend/access/hash/hashpage.c
  16. +1
    -1
      src/backend/access/hash/hashsearch.c
  17. +1
    -1
      src/backend/access/hash/hashutil.c
  18. +1
    -4
      src/backend/access/heap/heapam_handler.c
  19. +2
    -2
      src/backend/access/heap/pruneheap.c
  20. +2
    -10
      src/backend/access/heap/rewriteheap.c
  21. +1
    -1
      src/backend/access/nbtree/nbtxlog.c
  22. +1
    -2
      src/backend/access/spgist/spgquadtreeproc.c
  23. +1
    -1
      src/backend/access/transam/clog.c
  24. +1
    -2
      src/backend/access/transam/parallel.c
  25. +2
    -2
      src/backend/access/transam/rmgr.c
  26. +1
    -2
      src/backend/access/transam/slru.c
  27. +1
    -2
      src/backend/access/transam/twophase.c
  28. +1
    -2
      src/backend/access/transam/xact.c
  29. +3
    -3
      src/backend/access/transam/xlog.c
  30. +3
    -4
      src/backend/access/transam/xlogfuncs.c
  31. +1
    -1
      src/backend/access/transam/xloginsert.c
  32. +1
    -2
      src/backend/access/transam/xlogreader.c
  33. +2
    -3
      src/backend/catalog/aclchk.c
  34. +1
    -2
      src/backend/catalog/catalog.c
  35. +3
    -4
      src/backend/catalog/index.c
  36. +5
    -5
      src/backend/catalog/objectaddress.c
  37. +1
    -2
      src/backend/catalog/partition.c
  38. +1
    -2
      src/backend/catalog/pg_enum.c
  39. +3
    -6
      src/backend/catalog/pg_publication.c
  40. +3
    -4
      src/backend/catalog/pg_shdepend.c
  41. +2
    -8
      src/backend/catalog/pg_subscription.c
  42. +1
    -1
      src/backend/catalog/pg_type.c
  43. +1
    -2
      src/backend/catalog/storage.c
  44. +2
    -3
      src/backend/commands/alter.c
  45. +2
    -3
      src/backend/commands/cluster.c
  46. +1
    -2
      src/backend/commands/copy.c
  47. +1
    -2
      src/backend/commands/createas.c
  48. +1
    -2
      src/backend/commands/dbcommands.c
  49. +3
    -3
      src/backend/commands/event_trigger.c
  50. +1
    -1
      src/backend/commands/functioncmds.c
  51. +2
    -2
      src/backend/commands/lockcmds.c
  52. +1
    -2
      src/backend/commands/opclasscmds.c
  53. +1
    -1
      src/backend/commands/policy.c
  54. +3
    -7
      src/backend/commands/publicationcmds.c
  55. +1
    -2
      src/backend/commands/schemacmds.c
  56. +2
    -10
      src/backend/commands/subscriptioncmds.c
  57. +0
    -2
      src/backend/commands/tablecmds.c
  58. +1
    -2
      src/backend/commands/tablespace.c
  59. +2
    -2
      src/backend/commands/variable.c
  60. +1
    -2
      src/backend/commands/view.c
  61. +0
    -2
      src/backend/executor/execAmi.c
  62. +2
    -3
      src/backend/executor/execExprInterp.c
  63. +1
    -1
      src/backend/executor/execGrouping.c
  64. +2
    -2
      src/backend/executor/execParallel.c
  65. +1
    -2
      src/backend/executor/execProcnode.c
  66. +1
    -2
      src/backend/executor/execTuples.c
  67. +1
    -2
      src/backend/executor/nodeAgg.c
  68. +1
    -2
      src/backend/executor/nodeBitmapHeapscan.c
  69. +1
    -2
      src/backend/executor/nodeCustom.c
  70. +1
    -2
      src/backend/executor/nodeHash.c
  71. +1
    -2
      src/backend/executor/nodeSubplan.c
  72. +1
    -2
      src/backend/executor/nodeTableFuncscan.c
  73. +1
    -1
      src/backend/executor/nodeWindowAgg.c
  74. +2
    -5
      src/backend/jit/jit.c
  75. +7
    -11
      src/backend/jit/llvm/llvmjit.c
  76. +1
    -2
      src/backend/jit/llvm/llvmjit_expr.c
  77. +2
    -3
      src/backend/libpq/be-secure.c
  78. +1
    -1
      src/backend/libpq/hba.c
  79. +1
    -2
      src/backend/nodes/nodeFuncs.c
  80. +1
    -1
      src/backend/optimizer/geqo/geqo_cx.c
  81. +1
    -1
      src/backend/optimizer/geqo/geqo_erx.c
  82. +1
    -2
      src/backend/optimizer/path/clausesel.c
  83. +1
    -2
      src/backend/optimizer/plan/initsplan.c
  84. +1
    -2
      src/backend/optimizer/plan/planagg.c
  85. +3
    -4
      src/backend/optimizer/plan/planner.c
  86. +1
    -2
      src/backend/optimizer/prep/preptlist.c
  87. +1
    -2
      src/backend/optimizer/util/pathnode.c
  88. +3
    -4
      src/backend/optimizer/util/plancat.c
  89. +5
    -7
      src/backend/parser/parse_clause.c
  90. +1
    -2
      src/backend/parser/parse_expr.c
  91. +1
    -2
      src/backend/parser/parse_node.c
  92. +1
    -2
      src/backend/parser/parse_relation.c
  93. +1
    -2
      src/backend/parser/parse_target.c
  94. +1
    -2
      src/backend/parser/parse_type.c
  95. +1
    -2
      src/backend/parser/scansup.c
  96. +1
    -1
      src/backend/partitioning/partbounds.c
  97. +2
    -2
      src/backend/partitioning/partdesc.c
  98. +1
    -1
      src/backend/postmaster/bgworker.c
  99. +1
    -2
      src/backend/postmaster/bgwriter.c
  100. +2
    -1
      src/backend/postmaster/fork_process.c

+ 2
- 3
src/backend/access/brin/brin_minmax.c View File

@@ -10,19 +10,18 @@
*/
#include "postgres.h"

#include "access/genam.h"
#include "access/brin_internal.h"
#include "access/brin_tuple.h"
#include "access/genam.h"
#include "access/stratnum.h"
#include "catalog/pg_type.h"
#include "catalog/pg_amop.h"
#include "catalog/pg_type.h"
#include "utils/builtins.h"
#include "utils/datum.h"
#include "utils/lsyscache.h"
#include "utils/rel.h"
#include "utils/syscache.h"


typedef struct MinmaxOpaque
{
Oid cached_subtype;

+ 1
- 2
src/backend/access/brin/brin_pageops.c View File

@@ -10,8 +10,8 @@
*/
#include "postgres.h"

#include "access/brin_pageops.h"
#include "access/brin_page.h"
#include "access/brin_pageops.h"
#include "access/brin_revmap.h"
#include "access/brin_xlog.h"
#include "access/xloginsert.h"
@@ -22,7 +22,6 @@
#include "storage/smgr.h"
#include "utils/rel.h"


/*
* Maximum size of an entry in a BRIN_PAGETYPE_REGULAR page. We can tolerate
* a single item per page, unlike other index AMs.

+ 1
- 2
src/backend/access/brin/brin_tuple.c View File

@@ -31,14 +31,13 @@
*/
#include "postgres.h"

#include "access/htup_details.h"
#include "access/brin_tuple.h"
#include "access/htup_details.h"
#include "access/tupdesc.h"
#include "access/tupmacs.h"
#include "utils/datum.h"
#include "utils/memutils.h"


static inline void brin_deconstruct_tuple(BrinDesc *brdesc,
char *tp, bits8 *nullbits, bool nulls,
Datum *values, bool *allnulls, bool *hasnulls);

+ 1
- 2
src/backend/access/brin/brin_validate.c View File

@@ -22,9 +22,8 @@
#include "catalog/pg_opfamily.h"
#include "catalog/pg_type.h"
#include "utils/builtins.h"
#include "utils/syscache.h"
#include "utils/regproc.h"
#include "utils/syscache.h"

/*
* Validator for a BRIN opclass.

+ 1
- 1
src/backend/access/gin/ginbtree.c View File

@@ -17,8 +17,8 @@
#include "access/gin_private.h"
#include "access/ginxlog.h"
#include "access/xloginsert.h"
#include "storage/predicate.h"
#include "miscadmin.h"
#include "storage/predicate.h"
#include "utils/memutils.h"
#include "utils/rel.h"


+ 5
- 5
src/backend/access/gin/ginfast.c View File

@@ -20,19 +20,19 @@

#include "access/gin_private.h"
#include "access/ginxlog.h"
#include "access/xloginsert.h"
#include "access/xlog.h"
#include "commands/vacuum.h"
#include "access/xloginsert.h"
#include "catalog/pg_am.h"
#include "commands/vacuum.h"
#include "miscadmin.h"
#include "utils/memutils.h"
#include "utils/rel.h"
#include "utils/acl.h"
#include "postmaster/autovacuum.h"
#include "storage/indexfsm.h"
#include "storage/lmgr.h"
#include "storage/predicate.h"
#include "utils/acl.h"
#include "utils/builtins.h"
#include "utils/memutils.h"
#include "utils/rel.h"

/* GUC parameter */
int gin_pending_list_limit = 0;

+ 2
- 3
src/backend/access/gin/gininsert.c View File

@@ -16,18 +16,17 @@

#include "access/gin_private.h"
#include "access/ginxlog.h"
#include "access/xloginsert.h"
#include "access/tableam.h"
#include "access/xloginsert.h"
#include "catalog/index.h"
#include "miscadmin.h"
#include "storage/bufmgr.h"
#include "storage/smgr.h"
#include "storage/indexfsm.h"
#include "storage/predicate.h"
#include "storage/smgr.h"
#include "utils/memutils.h"
#include "utils/rel.h"


typedef struct
{
GinState ginstate;

+ 1
- 2
src/backend/access/gin/ginvalidate.c View File

@@ -23,9 +23,8 @@
#include "catalog/pg_type.h"
#include "utils/builtins.h"
#include "utils/lsyscache.h"
#include "utils/syscache.h"
#include "utils/regproc.h"
#include "utils/syscache.h"

/*
* Validator for a GIN opclass.

+ 1
- 2
src/backend/access/gist/gist.c View File

@@ -18,15 +18,14 @@
#include "access/gistscan.h"
#include "catalog/pg_collation.h"
#include "miscadmin.h"
#include "nodes/execnodes.h"
#include "storage/lmgr.h"
#include "storage/predicate.h"
#include "nodes/execnodes.h"
#include "utils/builtins.h"
#include "utils/index_selfuncs.h"
#include "utils/memutils.h"
#include "utils/rel.h"


/* non-export function prototypes */
static void gistfixsplit(GISTInsertState *state, GISTSTATE *giststate);
static bool gistinserttuple(GISTInsertState *state, GISTInsertStack *stack,

+ 2
- 2
src/backend/access/gist/gistget.c View File

@@ -17,11 +17,11 @@
#include "access/genam.h"
#include "access/gist_private.h"
#include "access/relscan.h"
#include "lib/pairingheap.h"
#include "miscadmin.h"
#include "pgstat.h"
#include "storage/lmgr.h"
#include "storage/predicate.h"
#include "pgstat.h"
#include "lib/pairingheap.h"
#include "utils/float.h"
#include "utils/memutils.h"
#include "utils/rel.h"

+ 2
- 3
src/backend/access/gist/gistutil.c View File

@@ -22,10 +22,9 @@
#include "storage/indexfsm.h"
#include "storage/lmgr.h"
#include "utils/float.h"
#include "utils/syscache.h"
#include "utils/snapmgr.h"
#include "utils/lsyscache.h"

#include "utils/snapmgr.h"
#include "utils/syscache.h"

/*
* Write itup vector to page, has no control of free space.

+ 0
- 2
src/backend/access/hash/hash.c View File

@@ -31,8 +31,6 @@
#include "utils/builtins.h"
#include "utils/index_selfuncs.h"
#include "utils/rel.h"
#include "miscadmin.h"


/* Working state for hashbuild and its callback */
typedef struct

+ 3
- 3
src/backend/access/hash/hash_xlog.c View File

@@ -17,11 +17,11 @@
#include "access/bufmask.h"
#include "access/hash.h"
#include "access/hash_xlog.h"
#include "access/xlogutils.h"
#include "access/xlog.h"
#include "access/transam.h"
#include "storage/procarray.h"
#include "access/xlog.h"
#include "access/xlogutils.h"
#include "miscadmin.h"
#include "storage/procarray.h"

/*
* replay a hash index meta page

+ 2
- 2
src/backend/access/hash/hashinsert.c View File

@@ -18,10 +18,10 @@
#include "access/hash.h"
#include "access/hash_xlog.h"
#include "miscadmin.h"
#include "utils/rel.h"
#include "storage/lwlock.h"
#include "storage/buf_internals.h"
#include "storage/lwlock.h"
#include "storage/predicate.h"
#include "utils/rel.h"

static void _hash_vacuum_one_page(Relation rel, Relation hrel,
Buffer metabuf, Buffer buf);

+ 1
- 2
src/backend/access/hash/hashpage.c View File

@@ -32,9 +32,8 @@
#include "access/hash_xlog.h"
#include "miscadmin.h"
#include "storage/lmgr.h"
#include "storage/smgr.h"
#include "storage/predicate.h"
#include "storage/smgr.h"

static bool _hash_alloc_buckets(Relation rel, BlockNumber firstblock,
uint32 nblocks);

+ 1
- 1
src/backend/access/hash/hashsearch.c View File

@@ -18,8 +18,8 @@
#include "access/relscan.h"
#include "miscadmin.h"
#include "pgstat.h"
#include "utils/rel.h"
#include "storage/predicate.h"
#include "utils/rel.h"

static bool _hash_readpage(IndexScanDesc scan, Buffer *bufP,
ScanDirection dir);

+ 1
- 1
src/backend/access/hash/hashutil.c View File

@@ -17,9 +17,9 @@
#include "access/hash.h"
#include "access/reloptions.h"
#include "access/relscan.h"
#include "storage/buf_internals.h"
#include "utils/lsyscache.h"
#include "utils/rel.h"
#include "storage/buf_internals.h"

#define CALC_NEW_BUCKET(old_bucket, lowmask) \
old_bucket | (lowmask + 1)

+ 1
- 4
src/backend/access/heap/heapam_handler.c View File

@@ -19,8 +19,6 @@
*/
#include "postgres.h"

#include "miscadmin.h"

#include "access/genam.h"
#include "access/heapam.h"
#include "access/heaptoast.h"
@@ -35,10 +33,10 @@
#include "catalog/storage_xlog.h"
#include "commands/progress.h"
#include "executor/executor.h"
#include "miscadmin.h"
#include "pgstat.h"
#include "storage/bufmgr.h"
#include "storage/bufpage.h"
#include "storage/bufmgr.h"
#include "storage/lmgr.h"
#include "storage/predicate.h"
#include "storage/procarray.h"
@@ -46,7 +44,6 @@
#include "utils/builtins.h"
#include "utils/rel.h"


static void reform_and_rewrite_tuple(HeapTuple tuple,
Relation OldHeap, Relation NewHeap,
Datum *values, bool *isnull, RewriteState rwstate);

+ 2
- 2
src/backend/access/heap/pruneheap.c View File

@@ -16,15 +16,15 @@

#include "access/heapam.h"
#include "access/heapam_xlog.h"
#include "access/transam.h"
#include "access/htup_details.h"
#include "access/transam.h"
#include "access/xlog.h"
#include "catalog/catalog.h"
#include "miscadmin.h"
#include "pgstat.h"
#include "storage/bufmgr.h"
#include "utils/snapmgr.h"
#include "utils/rel.h"
#include "utils/snapmgr.h"

/* Working data for heap_page_prune and subroutines */
typedef struct

+ 2
- 10
src/backend/access/heap/rewriteheap.c View File

@@ -105,8 +105,6 @@
#include <sys/stat.h>
#include <unistd.h>

#include "miscadmin.h"

#include "access/heapam.h"
#include "access/heapam_xlog.h"
#include "access/heaptoast.h"
@@ -114,25 +112,19 @@
#include "access/transam.h"
#include "access/xact.h"
#include "access/xloginsert.h"

#include "catalog/catalog.h"

#include "lib/ilist.h"
#include "miscadmin.h"
#include "pgstat.h"

#include "replication/logical.h"
#include "replication/slot.h"

#include "storage/bufmgr.h"
#include "storage/fd.h"
#include "storage/procarray.h"
#include "storage/smgr.h"

#include "utils/memutils.h"
#include "utils/rel.h"

#include "storage/procarray.h"

/*
* State associated with a rewrite operation. This is opaque to the user
* of the rewrite facility.

+ 1
- 1
src/backend/access/nbtree/nbtxlog.c View File

@@ -20,8 +20,8 @@
#include "access/transam.h"
#include "access/xlog.h"
#include "access/xlogutils.h"
#include "storage/procarray.h"
#include "miscadmin.h"
#include "storage/procarray.h"

/*
* _bt_restore_page -- re-enter all the index tuples on a page

+ 1
- 2
src/backend/access/spgist/spgquadtreeproc.c View File

@@ -16,14 +16,13 @@
#include "postgres.h"

#include "access/spgist.h"
#include "access/stratnum.h"
#include "access/spgist_private.h"
#include "access/stratnum.h"
#include "catalog/pg_type.h"
#include "utils/builtins.h"
#include "utils/float.h"
#include "utils/geo_decls.h"


Datum
spg_quad_config(PG_FUNCTION_ARGS)
{

+ 1
- 1
src/backend/access/transam/clog.c View File

@@ -39,8 +39,8 @@
#include "access/xloginsert.h"
#include "access/xlogutils.h"
#include "miscadmin.h"
#include "pgstat.h"
#include "pg_trace.h"
#include "pgstat.h"
#include "storage/proc.h"

/*

+ 1
- 2
src/backend/access/transam/parallel.c View File

@@ -19,9 +19,9 @@
#include "access/session.h"
#include "access/xact.h"
#include "access/xlog.h"
#include "catalog/pg_enum.h"
#include "catalog/index.h"
#include "catalog/namespace.h"
#include "catalog/pg_enum.h"
#include "commands/async.h"
#include "executor/execParallel.h"
#include "libpq/libpq.h"
@@ -43,7 +43,6 @@
#include "utils/snapmgr.h"
#include "utils/typcache.h"


/*
* We don't want to waste a lot of memory on an error queue which, most of
* the time, will process only a handful of small messages. However, it is

+ 2
- 2
src/backend/access/transam/rmgr.c View File

@@ -7,14 +7,14 @@
*/
#include "postgres.h"

#include "access/brin_xlog.h"
#include "access/clog.h"
#include "access/commit_ts.h"
#include "access/generic_xlog.h"
#include "access/ginxlog.h"
#include "access/gistxlog.h"
#include "access/generic_xlog.h"
#include "access/hash_xlog.h"
#include "access/heapam_xlog.h"
#include "access/brin_xlog.h"
#include "access/multixact.h"
#include "access/nbtxlog.h"
#include "access/spgxlog.h"

+ 1
- 2
src/backend/access/transam/slru.c View File

@@ -54,11 +54,10 @@
#include "access/slru.h"
#include "access/transam.h"
#include "access/xlog.h"
#include "miscadmin.h"
#include "pgstat.h"
#include "storage/fd.h"
#include "storage/shmem.h"
#include "miscadmin.h"


#define SlruFileName(ctl, path, seg) \
snprintf(path, MAXPGPATH, "%s/%04X", (ctl)->Dir, seg)

+ 1
- 2
src/backend/access/transam/twophase.c View File

@@ -85,8 +85,8 @@
#include "access/xact.h"
#include "access/xlog.h"
#include "access/xloginsert.h"
#include "access/xlogutils.h"
#include "access/xlogreader.h"
#include "access/xlogutils.h"
#include "catalog/pg_type.h"
#include "catalog/storage.h"
#include "funcapi.h"
@@ -108,7 +108,6 @@
#include "utils/memutils.h"
#include "utils/timestamp.h"


/*
* Directory where Two-phase commit files reside within PGDATA
*/

+ 1
- 2
src/backend/access/transam/xact.c View File

@@ -40,6 +40,7 @@
#include "libpq/be-fsstubs.h"
#include "libpq/pqsignal.h"
#include "miscadmin.h"
#include "pg_trace.h"
#include "pgstat.h"
#include "replication/logical.h"
#include "replication/logicallauncher.h"
@@ -65,8 +66,6 @@
#include "utils/snapmgr.h"
#include "utils/timeout.h"
#include "utils/timestamp.h"
#include "pg_trace.h"


/*
* User-tweakable parameters

+ 3
- 3
src/backend/access/transam/xlog.c View File

@@ -42,15 +42,16 @@
#include "commands/tablespace.h"
#include "common/controldata_utils.h"
#include "miscadmin.h"
#include "pg_trace.h"
#include "pgstat.h"
#include "port/atomics.h"
#include "postmaster/bgwriter.h"
#include "postmaster/walwriter.h"
#include "postmaster/startup.h"
#include "postmaster/walwriter.h"
#include "replication/basebackup.h"
#include "replication/logical.h"
#include "replication/slot.h"
#include "replication/origin.h"
#include "replication/slot.h"
#include "replication/snapbuild.h"
#include "replication/walreceiver.h"
#include "replication/walsender.h"
@@ -74,7 +75,6 @@
#include "utils/relmapper.h"
#include "utils/snapmgr.h"
#include "utils/timestamp.h"
#include "pg_trace.h"

extern uint32 bootstrap_data_checksum_version;


+ 3
- 4
src/backend/access/transam/xlogfuncs.c View File

@@ -27,17 +27,16 @@
#include "miscadmin.h"
#include "pgstat.h"
#include "replication/walreceiver.h"
#include "storage/fd.h"
#include "storage/ipc.h"
#include "storage/smgr.h"
#include "utils/builtins.h"
#include "utils/guc.h"
#include "utils/memutils.h"
#include "utils/numeric.h"
#include "utils/guc.h"
#include "utils/pg_lsn.h"
#include "utils/timestamp.h"
#include "utils/tuplestore.h"
#include "storage/fd.h"
#include "storage/ipc.h"


/*
* Store label file and tablespace map during non-exclusive backups.

+ 1
- 1
src/backend/access/transam/xloginsert.c View File

@@ -26,11 +26,11 @@
#include "catalog/pg_control.h"
#include "common/pg_lzcompress.h"
#include "miscadmin.h"
#include "pg_trace.h"
#include "replication/origin.h"
#include "storage/bufmgr.h"
#include "storage/proc.h"
#include "utils/memutils.h"
#include "pg_trace.h"

/* Buffer size required to store a compressed version of backup block image */
#define PGLZ_MAX_BLCKSZ PGLZ_MAX_OUTPUT(BLCKSZ)

+ 1
- 2
src/backend/access/transam/xlogreader.c View File

@@ -18,9 +18,9 @@
#include "postgres.h"

#include "access/transam.h"
#include "access/xlogrecord.h"
#include "access/xlog_internal.h"
#include "access/xlogreader.h"
#include "access/xlogrecord.h"
#include "catalog/pg_control.h"
#include "common/pg_lzcompress.h"
#include "replication/origin.h"
@@ -30,7 +30,6 @@
#include "utils/memutils.h"
#endif


static void report_invalid_record(XLogReaderState *state, const char *fmt,...)
pg_attribute_printf(2, 3);
static bool allocate_recordbuf(XLogReaderState *state, uint32 reclength);

+ 2
- 3
src/backend/catalog/aclchk.c View File

@@ -52,12 +52,12 @@
#include "catalog/pg_statistic_ext.h"
#include "catalog/pg_subscription.h"
#include "catalog/pg_tablespace.h"
#include "catalog/pg_type.h"
#include "catalog/pg_transform.h"
#include "catalog/pg_ts_config.h"
#include "catalog/pg_ts_dict.h"
#include "catalog/pg_ts_parser.h"
#include "catalog/pg_ts_template.h"
#include "catalog/pg_transform.h"
#include "catalog/pg_type.h"
#include "commands/dbcommands.h"
#include "commands/event_trigger.h"
#include "commands/extension.h"
@@ -76,7 +76,6 @@
#include "utils/rel.h"
#include "utils/syscache.h"


/*
* Internal format used by ALTER DEFAULT PRIVILEGES.
*/

+ 1
- 2
src/backend/catalog/catalog.c View File

@@ -31,9 +31,9 @@
#include "catalog/pg_auth_members.h"
#include "catalog/pg_authid.h"
#include "catalog/pg_database.h"
#include "catalog/pg_db_role_setting.h"
#include "catalog/pg_namespace.h"
#include "catalog/pg_pltemplate.h"
#include "catalog/pg_db_role_setting.h"
#include "catalog/pg_replication_origin.h"
#include "catalog/pg_shdepend.h"
#include "catalog/pg_shdescription.h"
@@ -50,7 +50,6 @@
#include "utils/snapmgr.h"
#include "utils/syscache.h"


/*
* IsSystemRelation
* True iff the relation is either a system catalog or a toast table.

+ 3
- 4
src/backend/catalog/index.c View File

@@ -43,11 +43,11 @@
#include "catalog/pg_am.h"
#include "catalog/pg_collation.h"
#include "catalog/pg_constraint.h"
#include "catalog/pg_description.h"
#include "catalog/pg_depend.h"
#include "catalog/pg_description.h"
#include "catalog/pg_inherits.h"
#include "catalog/pg_operator.h"
#include "catalog/pg_opclass.h"
#include "catalog/pg_operator.h"
#include "catalog/pg_tablespace.h"
#include "catalog/pg_trigger.h"
#include "catalog/pg_type.h"
@@ -76,10 +76,9 @@
#include "utils/lsyscache.h"
#include "utils/memutils.h"
#include "utils/pg_rusage.h"
#include "utils/snapmgr.h"
#include "utils/syscache.h"
#include "utils/tuplesort.h"
#include "utils/snapmgr.h"


/* Potentially set by pg_upgrade_support functions */
Oid binary_upgrade_next_index_pg_class_oid = InvalidOid;

+ 5
- 5
src/backend/catalog/objectaddress.c View File

@@ -29,13 +29,13 @@
#include "catalog/pg_attrdef.h"
#include "catalog/pg_authid.h"
#include "catalog/pg_cast.h"
#include "catalog/pg_default_acl.h"
#include "catalog/pg_enum.h"
#include "catalog/pg_event_trigger.h"
#include "catalog/pg_collation.h"
#include "catalog/pg_constraint.h"
#include "catalog/pg_conversion.h"
#include "catalog/pg_database.h"
#include "catalog/pg_default_acl.h"
#include "catalog/pg_enum.h"
#include "catalog/pg_event_trigger.h"
#include "catalog/pg_extension.h"
#include "catalog/pg_foreign_data_wrapper.h"
#include "catalog/pg_foreign_server.h"
@@ -44,10 +44,10 @@
#include "catalog/pg_largeobject_metadata.h"
#include "catalog/pg_namespace.h"
#include "catalog/pg_opclass.h"
#include "catalog/pg_opfamily.h"
#include "catalog/pg_operator.h"
#include "catalog/pg_proc.h"
#include "catalog/pg_opfamily.h"
#include "catalog/pg_policy.h"
#include "catalog/pg_proc.h"
#include "catalog/pg_publication.h"
#include "catalog/pg_publication_rel.h"
#include "catalog/pg_rewrite.h"

+ 1
- 2
src/backend/catalog/partition.c View File

@@ -16,9 +16,9 @@

#include "access/genam.h"
#include "access/htup_details.h"
#include "access/sysattr.h"
#include "access/table.h"
#include "access/tupconvert.h"
#include "access/sysattr.h"
#include "catalog/indexing.h"
#include "catalog/partition.h"
#include "catalog/pg_inherits.h"
@@ -32,7 +32,6 @@
#include "utils/rel.h"
#include "utils/syscache.h"


static Oid get_partition_parent_worker(Relation inhRel, Oid relid);
static void get_partition_ancestors_worker(Relation inhRel, Oid relid,
List **ancestors);

+ 1
- 2
src/backend/catalog/pg_enum.c View File

@@ -22,9 +22,9 @@
#include "catalog/indexing.h"
#include "catalog/pg_enum.h"
#include "catalog/pg_type.h"
#include "storage/lmgr.h"
#include "miscadmin.h"
#include "nodes/value.h"
#include "storage/lmgr.h"
#include "utils/builtins.h"
#include "utils/catcache.h"
#include "utils/fmgroids.h"
@@ -32,7 +32,6 @@
#include "utils/memutils.h"
#include "utils/syscache.h"


/* Potentially set by pg_upgrade_support functions */
Oid binary_upgrade_next_pg_enum_oid = InvalidOid;


+ 3
- 6
src/backend/catalog/pg_publication.c View File

@@ -14,15 +14,11 @@

#include "postgres.h"

#include "funcapi.h"
#include "miscadmin.h"

#include "access/genam.h"
#include "access/heapam.h"
#include "access/htup_details.h"
#include "access/tableam.h"
#include "access/xact.h"

#include "catalog/catalog.h"
#include "catalog/dependency.h"
#include "catalog/index.h"
@@ -30,10 +26,11 @@
#include "catalog/namespace.h"
#include "catalog/objectaccess.h"
#include "catalog/objectaddress.h"
#include "catalog/pg_type.h"
#include "catalog/pg_publication.h"
#include "catalog/pg_publication_rel.h"

#include "catalog/pg_type.h"
#include "funcapi.h"
#include "miscadmin.h"
#include "utils/array.h"
#include "utils/builtins.h"
#include "utils/catcache.h"

+ 3
- 4
src/backend/catalog/pg_shdepend.c View File

@@ -34,8 +34,8 @@
#include "catalog/pg_largeobject.h"
#include "catalog/pg_largeobject_metadata.h"
#include "catalog/pg_namespace.h"
#include "catalog/pg_operator.h"
#include "catalog/pg_opclass.h"
#include "catalog/pg_operator.h"
#include "catalog/pg_opfamily.h"
#include "catalog/pg_proc.h"
#include "catalog/pg_shdepend.h"
@@ -47,9 +47,9 @@
#include "catalog/pg_type.h"
#include "catalog/pg_user_mapping.h"
#include "commands/alter.h"
#include "commands/dbcommands.h"
#include "commands/collationcmds.h"
#include "commands/conversioncmds.h"
#include "commands/dbcommands.h"
#include "commands/defrem.h"
#include "commands/event_trigger.h"
#include "commands/extension.h"
@@ -60,13 +60,12 @@
#include "commands/subscriptioncmds.h"
#include "commands/tablecmds.h"
#include "commands/typecmds.h"
#include "storage/lmgr.h"
#include "miscadmin.h"
#include "storage/lmgr.h"
#include "utils/acl.h"
#include "utils/fmgroids.h"
#include "utils/syscache.h"


typedef enum
{
LOCAL_OBJECT,

+ 2
- 8
src/backend/catalog/pg_subscription.c View File

@@ -14,23 +14,18 @@

#include "postgres.h"

#include "miscadmin.h"

#include "access/genam.h"
#include "access/heapam.h"
#include "access/htup_details.h"
#include "access/tableam.h"
#include "access/xact.h"

#include "catalog/indexing.h"
#include "catalog/pg_type.h"
#include "catalog/pg_subscription.h"
#include "catalog/pg_subscription_rel.h"

#include "catalog/pg_type.h"
#include "miscadmin.h"
#include "nodes/makefuncs.h"

#include "storage/lmgr.h"

#include "utils/array.h"
#include "utils/builtins.h"
#include "utils/fmgroids.h"
@@ -38,7 +33,6 @@
#include "utils/rel.h"
#include "utils/syscache.h"


static List *textarray_to_stringlist(ArrayType *textarray);

/*

+ 1
- 1
src/backend/catalog/pg_type.c View File

@@ -17,8 +17,8 @@
#include "access/htup_details.h"
#include "access/table.h"
#include "access/xact.h"
#include "catalog/catalog.h"
#include "catalog/binary_upgrade.h"
#include "catalog/catalog.h"
#include "catalog/dependency.h"
#include "catalog/indexing.h"
#include "catalog/objectaccess.h"

+ 1
- 2
src/backend/catalog/storage.c View File

@@ -19,8 +19,6 @@

#include "postgres.h"

#include "miscadmin.h"

#include "access/visibilitymap.h"
#include "access/xact.h"
#include "access/xlog.h"
@@ -28,6 +26,7 @@
#include "access/xlogutils.h"
#include "catalog/storage.h"
#include "catalog/storage_xlog.h"
#include "miscadmin.h"
#include "storage/freespace.h"
#include "storage/smgr.h"
#include "utils/memutils.h"

+ 2
- 3
src/backend/commands/alter.c View File

@@ -34,8 +34,8 @@
#include "catalog/pg_opclass.h"
#include "catalog/pg_opfamily.h"
#include "catalog/pg_proc.h"
#include "catalog/pg_subscription.h"
#include "catalog/pg_statistic_ext.h"
#include "catalog/pg_subscription.h"
#include "catalog/pg_ts_config.h"
#include "catalog/pg_ts_dict.h"
#include "catalog/pg_ts_parser.h"
@@ -57,8 +57,8 @@
#include "commands/trigger.h"
#include "commands/typecmds.h"
#include "commands/user.h"
#include "parser/parse_func.h"
#include "miscadmin.h"
#include "parser/parse_func.h"
#include "rewrite/rewriteDefine.h"
#include "tcop/utility.h"
#include "utils/builtins.h"
@@ -67,7 +67,6 @@
#include "utils/rel.h"
#include "utils/syscache.h"


static Oid AlterObjectNamespace_internal(Relation rel, Oid objid, Oid nspOid);

/*

+ 2
- 3
src/backend/commands/cluster.c View File

@@ -22,17 +22,17 @@
#include "access/multixact.h"
#include "access/relscan.h"
#include "access/tableam.h"
#include "access/transam.h"
#include "access/toast_internals.h"
#include "access/transam.h"
#include "access/xact.h"
#include "access/xlog.h"
#include "catalog/pg_am.h"
#include "catalog/catalog.h"
#include "catalog/dependency.h"
#include "catalog/heap.h"
#include "catalog/index.h"
#include "catalog/namespace.h"
#include "catalog/objectaccess.h"
#include "catalog/pg_am.h"
#include "catalog/toasting.h"
#include "commands/cluster.h"
#include "commands/progress.h"
@@ -55,7 +55,6 @@
#include "utils/syscache.h"
#include "utils/tuplesort.h"


/*
* This struct is used to pass around the information on tables to be
* clustered. We need this so we can make a list of them when invoked without

+ 1
- 2
src/backend/commands/copy.c View File

@@ -39,8 +39,8 @@
#include "libpq/pqformat.h"
#include "mb/pg_wchar.h"
#include "miscadmin.h"
#include "optimizer/optimizer.h"
#include "nodes/makefuncs.h"
#include "optimizer/optimizer.h"
#include "parser/parse_coerce.h"
#include "parser/parse_collate.h"
#include "parser/parse_expr.h"
@@ -58,7 +58,6 @@
#include "utils/rls.h"
#include "utils/snapmgr.h"


#define ISOCTAL(c) (((c) >= '0') && ((c) <= '7'))
#define OCTVALUE(c) ((c) - '0')


+ 1
- 2
src/backend/commands/createas.c View File

@@ -25,8 +25,8 @@
#include "postgres.h"

#include "access/heapam.h"
#include "access/reloptions.h"
#include "access/htup_details.h"
#include "access/reloptions.h"
#include "access/sysattr.h"
#include "access/tableam.h"
#include "access/xact.h"
@@ -51,7 +51,6 @@
#include "utils/rls.h"
#include "utils/snapmgr.h"


typedef struct
{
DestReceiver pub; /* publicly-known function pointers */

+ 1
- 2
src/backend/commands/dbcommands.c View File

@@ -53,8 +53,8 @@
#include "replication/slot.h"
#include "storage/copydir.h"
#include "storage/fd.h"
#include "storage/lmgr.h"
#include "storage/ipc.h"
#include "storage/lmgr.h"
#include "storage/md.h"
#include "storage/procarray.h"
#include "storage/smgr.h"
@@ -65,7 +65,6 @@
#include "utils/snapmgr.h"
#include "utils/syscache.h"


typedef struct
{
Oid src_dboid; /* source (template) DB */

+ 3
- 3
src/backend/commands/event_trigger.c View File

@@ -33,11 +33,12 @@
#include "commands/extension.h"
#include "commands/trigger.h"
#include "funcapi.h"
#include "parser/parse_func.h"
#include "pgstat.h"
#include "lib/ilist.h"
#include "miscadmin.h"
#include "parser/parse_func.h"
#include "pgstat.h"
#include "tcop/deparse_utility.h"
#include "tcop/utility.h"
#include "utils/acl.h"
#include "utils/builtins.h"
#include "utils/evtcache.h"
@@ -46,7 +47,6 @@
#include "utils/memutils.h"
#include "utils/rel.h"
#include "utils/syscache.h"
#include "tcop/utility.h"

typedef struct EventTriggerQueryState
{

+ 1
- 1
src/backend/commands/functioncmds.c View File

@@ -34,8 +34,8 @@

#include "access/genam.h"
#include "access/htup_details.h"
#include "access/table.h"
#include "access/sysattr.h"
#include "access/table.h"
#include "catalog/catalog.h"
#include "catalog/dependency.h"
#include "catalog/indexing.h"

+ 2
- 2
src/backend/commands/lockcmds.c View File

@@ -20,13 +20,13 @@
#include "catalog/pg_inherits.h"
#include "commands/lockcmds.h"
#include "miscadmin.h"
#include "nodes/nodeFuncs.h"
#include "parser/parse_clause.h"
#include "rewrite/rewriteHandler.h"
#include "storage/lmgr.h"
#include "utils/acl.h"
#include "utils/lsyscache.h"
#include "utils/syscache.h"
#include "rewrite/rewriteHandler.h"
#include "nodes/nodeFuncs.h"

static void LockTableRecurse(Oid reloid, LOCKMODE lockmode, bool nowait, Oid userid);
static AclResult LockTableAclCheck(Oid relid, LOCKMODE lockmode, Oid userid);

+ 1
- 2
src/backend/commands/opclasscmds.c View File

@@ -19,8 +19,8 @@

#include "access/genam.h"
#include "access/hash.h"
#include "access/nbtree.h"
#include "access/htup_details.h"
#include "access/nbtree.h"
#include "access/sysattr.h"
#include "access/table.h"
#include "catalog/catalog.h"
@@ -50,7 +50,6 @@
#include "utils/rel.h"
#include "utils/syscache.h"


static void AlterOpFamilyAdd(AlterOpFamilyStmt *stmt,
Oid amoid, Oid opfamilyoid,
int maxOpNumber, int maxProcNumber,

+ 1
- 1
src/backend/commands/policy.c View File

@@ -16,8 +16,8 @@
#include "access/htup.h"
#include "access/htup_details.h"
#include "access/relation.h"
#include "access/table.h"
#include "access/sysattr.h"
#include "access/table.h"
#include "catalog/catalog.h"
#include "catalog/dependency.h"
#include "catalog/indexing.h"

+ 3
- 7
src/backend/commands/publicationcmds.c View File

@@ -14,29 +14,25 @@

#include "postgres.h"

#include "funcapi.h"
#include "miscadmin.h"

#include "access/genam.h"
#include "access/htup_details.h"
#include "access/table.h"
#include "access/xact.h"

#include "catalog/catalog.h"
#include "catalog/indexing.h"
#include "catalog/namespace.h"
#include "catalog/objectaccess.h"
#include "catalog/objectaddress.h"
#include "catalog/pg_inherits.h"
#include "catalog/pg_type.h"
#include "catalog/pg_publication.h"
#include "catalog/pg_publication_rel.h"
#include "catalog/pg_type.h"
#include "commands/dbcommands.h"
#include "commands/defrem.h"
#include "commands/event_trigger.h"
#include "commands/publicationcmds.h"

#include "funcapi.h"
#include "miscadmin.h"
#include "utils/array.h"
#include "utils/builtins.h"
#include "utils/catcache.h"

+ 1
- 2
src/backend/commands/schemacmds.c View File

@@ -21,8 +21,8 @@
#include "catalog/dependency.h"
#include "catalog/indexing.h"
#include "catalog/namespace.h"
#include "catalog/pg_authid.h"
#include "catalog/objectaccess.h"
#include "catalog/pg_authid.h"
#include "catalog/pg_namespace.h"
#include "commands/dbcommands.h"
#include "commands/event_trigger.h"
@@ -35,7 +35,6 @@
#include "utils/rel.h"
#include "utils/syscache.h"


static void AlterSchemaOwner_internal(HeapTuple tup, Relation rel, Oid newOwnerId);

/*

+ 2
- 10
src/backend/commands/subscriptioncmds.c View File

@@ -14,38 +14,30 @@

#include "postgres.h"

#include "miscadmin.h"

#include "access/htup_details.h"
#include "access/table.h"
#include "access/xact.h"

#include "catalog/catalog.h"
#include "catalog/dependency.h"
#include "catalog/indexing.h"
#include "catalog/namespace.h"
#include "catalog/objectaccess.h"
#include "catalog/objectaddress.h"
#include "catalog/pg_type.h"
#include "catalog/pg_subscription.h"
#include "catalog/pg_subscription_rel.h"
#include "catalog/pg_type.h"
#include "commands/defrem.h"
#include "commands/event_trigger.h"
#include "commands/subscriptioncmds.h"

#include "executor/executor.h"
#include "miscadmin.h"
#include "nodes/makefuncs.h"

#include "replication/logicallauncher.h"
#include "replication/origin.h"
#include "replication/walreceiver.h"
#include "replication/walsender.h"
#include "replication/worker_internal.h"

#include "storage/lmgr.h"

#include "utils/builtins.h"
#include "utils/guc.h"
#include "utils/lsyscache.h"

+ 0
- 2
src/backend/commands/tablecmds.c View File

@@ -20,7 +20,6 @@
#include "access/multixact.h"
#include "access/reloptions.h"
#include "access/relscan.h"
#include "access/tableam.h"
#include "access/sysattr.h"
#include "access/tableam.h"
#include "access/tupconvert.h"
@@ -100,7 +99,6 @@
#include "utils/timestamp.h"
#include "utils/typcache.h"


/*
* ON COMMIT action list
*/

+ 1
- 2
src/backend/commands/tablespace.c View File

@@ -51,8 +51,8 @@
#include <sys/stat.h>

#include "access/heapam.h"
#include "access/reloptions.h"
#include "access/htup_details.h"
#include "access/reloptions.h"
#include "access/sysattr.h"
#include "access/tableam.h"
#include "access/xact.h"
@@ -84,7 +84,6 @@
#include "utils/rel.h"
#include "utils/varlena.h"


/* GUC variables */
char *default_tablespace = NULL;
char *temp_tablespaces = NULL;

+ 2
- 2
src/backend/commands/variable.c View File

@@ -24,14 +24,14 @@
#include "access/xlog.h"
#include "catalog/pg_authid.h"
#include "commands/variable.h"
#include "mb/pg_wchar.h"
#include "miscadmin.h"
#include "utils/acl.h"
#include "utils/builtins.h"
#include "utils/syscache.h"
#include "utils/snapmgr.h"
#include "utils/syscache.h"
#include "utils/timestamp.h"
#include "utils/varlena.h"
#include "mb/pg_wchar.h"

/*
* DATESTYLE

+ 1
- 2
src/backend/commands/view.c View File

@@ -26,8 +26,8 @@
#include "parser/analyze.h"
#include "parser/parse_relation.h"
#include "rewrite/rewriteDefine.h"
#include "rewrite/rewriteManip.h"
#include "rewrite/rewriteHandler.h"
#include "rewrite/rewriteManip.h"
#include "rewrite/rewriteSupport.h"
#include "utils/acl.h"
#include "utils/builtins.h"
@@ -35,7 +35,6 @@
#include "utils/rel.h"
#include "utils/syscache.h"


static void checkViewTupleDesc(TupleDesc newdesc, TupleDesc olddesc);

/*---------------------------------------------------------------------

+ 0
- 2
src/backend/executor/execAmi.c View File

@@ -28,7 +28,6 @@
#include "executor/nodeGather.h"
#include "executor/nodeGatherMerge.h"
#include "executor/nodeGroup.h"
#include "executor/nodeGroup.h"
#include "executor/nodeHash.h"
#include "executor/nodeHashjoin.h"
#include "executor/nodeIndexonlyscan.h"
@@ -62,7 +61,6 @@
#include "utils/rel.h"
#include "utils/syscache.h"


static bool IndexSupportsBackwardScan(Oid indexid);



+ 2
- 3
src/backend/executor/execExprInterp.c View File

@@ -62,22 +62,21 @@
#include "executor/execExpr.h"
#include "executor/nodeSubplan.h"
#include "funcapi.h"
#include "utils/array.h"
#include "utils/memutils.h"
#include "miscadmin.h"
#include "nodes/nodeFuncs.h"
#include "parser/parsetree.h"
#include "pgstat.h"
#include "utils/array.h"
#include "utils/builtins.h"
#include "utils/date.h"
#include "utils/datum.h"
#include "utils/expandedrecord.h"
#include "utils/lsyscache.h"
#include "utils/memutils.h"
#include "utils/timestamp.h"
#include "utils/typcache.h"
#include "utils/xml.h"


/*
* Use computed-goto-based opcode dispatch when computed gotos are available.
* But use a separate symbol so that it's easy to adjust locally in this file

+ 1
- 1
src/backend/executor/execGrouping.c View File

@@ -21,8 +21,8 @@
#include "access/parallel.h"
#include "executor/executor.h"
#include "miscadmin.h"
#include "utils/lsyscache.h"
#include "utils/hashutils.h"
#include "utils/lsyscache.h"
#include "utils/memutils.h"

static uint32 TupleHashTableHash(struct tuplehash_hash *tb, const MinimalTuple tuple);

+ 2
- 2
src/backend/executor/execParallel.c View File

@@ -31,14 +31,15 @@
#include "executor/nodeForeignscan.h"
#include "executor/nodeHash.h"
#include "executor/nodeHashjoin.h"
#include "executor/nodeIndexscan.h"
#include "executor/nodeIndexonlyscan.h"
#include "executor/nodeIndexscan.h"
#include "executor/nodeSeqscan.h"
#include "executor/nodeSort.h"
#include "executor/nodeSubplan.h"
#include "executor/tqueue.h"
#include "jit/jit.h"
#include "nodes/nodeFuncs.h"
#include "pgstat.h"
#include "storage/spin.h"
#include "tcop/tcopprot.h"
#include "utils/datum.h"
@@ -46,7 +47,6 @@
#include "utils/lsyscache.h"
#include "utils/memutils.h"
#include "utils/snapmgr.h"
#include "pgstat.h"

/*
* Magic numbers for parallel executor communication. We use constants

+ 1
- 2
src/backend/executor/execProcnode.c View File

@@ -113,9 +113,8 @@
#include "executor/nodeValuesscan.h"
#include "executor/nodeWindowAgg.h"
#include "executor/nodeWorktablescan.h"
#include "nodes/nodeFuncs.h"
#include "miscadmin.h"
#include "nodes/nodeFuncs.h"

static TupleTableSlot *ExecProcNodeFirst(PlanState *node);
static TupleTableSlot *ExecProcNodeInstr(PlanState *node);

+ 1
- 2
src/backend/executor/execTuples.c View File

@@ -60,8 +60,8 @@
#include "access/heaptoast.h"
#include "access/htup_details.h"
#include "access/tupdesc_details.h"
#include "funcapi.h"
#include "catalog/pg_type.h"
#include "funcapi.h"
#include "nodes/nodeFuncs.h"
#include "storage/bufmgr.h"
#include "utils/builtins.h"
@@ -69,7 +69,6 @@
#include "utils/lsyscache.h"
#include "utils/typcache.h"


static TupleDesc ExecTypeFromTLInternal(List *targetList,
bool skipjunk);
static pg_attribute_always_inline void slot_deform_heap_tuple(TupleTableSlot *slot, HeapTuple tuple, uint32 *offp,

+ 1
- 2
src/backend/executor/nodeAgg.c View File

@@ -231,13 +231,12 @@
#include "parser/parse_coerce.h"
#include "utils/acl.h"
#include "utils/builtins.h"
#include "utils/datum.h"
#include "utils/expandeddatum.h"
#include "utils/lsyscache.h"
#include "utils/memutils.h"
#include "utils/syscache.h"
#include "utils/tuplesort.h"
#include "utils/datum.h"


static void select_current_set(AggState *aggstate, int setno, bool is_hash);
static void initialize_phase(AggState *aggstate, int newphase);

+ 1
- 2
src/backend/executor/nodeBitmapHeapscan.c View File

@@ -49,9 +49,8 @@
#include "storage/predicate.h"
#include "utils/memutils.h"
#include "utils/rel.h"
#include "utils/spccache.h"
#include "utils/snapmgr.h"
#include "utils/spccache.h"

static TupleTableSlot *BitmapHeapNext(BitmapHeapScanState *node);
static inline void BitmapDoneInitializingSharedState(ParallelBitmapHeapState *pstate);

+ 1
- 2
src/backend/executor/nodeCustom.c View File

@@ -13,16 +13,15 @@
#include "access/parallel.h"
#include "executor/executor.h"
#include "executor/nodeCustom.h"
#include "miscadmin.h"
#include "nodes/execnodes.h"
#include "nodes/extensible.h"
#include "nodes/plannodes.h"
#include "miscadmin.h"
#include "parser/parsetree.h"
#include "utils/hsearch.h"
#include "utils/memutils.h"
#include "utils/rel.h"


static TupleTableSlot *ExecCustomScan(PlanState *pstate);



+ 1
- 2
src/backend/executor/nodeHash.c View File

@@ -38,11 +38,10 @@
#include "pgstat.h"
#include "port/atomics.h"
#include "utils/dynahash.h"
#include "utils/memutils.h"
#include "utils/lsyscache.h"
#include "utils/memutils.h"
#include "utils/syscache.h"


static void ExecHashIncreaseNumBatches(HashJoinTable hashtable);
static void ExecHashIncreaseNumBuckets(HashJoinTable hashtable);
static void ExecParallelHashIncreaseNumBatches(HashJoinTable hashtable);

+ 1
- 2
src/backend/executor/nodeSubplan.c View File

@@ -32,14 +32,13 @@
#include "access/htup_details.h"
#include "executor/executor.h"
#include "executor/nodeSubplan.h"
#include "miscadmin.h"
#include "nodes/makefuncs.h"
#include "nodes/nodeFuncs.h"
#include "miscadmin.h"
#include "utils/array.h"
#include "utils/lsyscache.h"
#include "utils/memutils.h"


static Datum ExecHashSubPlan(SubPlanState *node,
ExprContext *econtext,
bool *isNull);

+ 1
- 2
src/backend/executor/nodeTableFuncscan.c View File

@@ -22,17 +22,16 @@
*/
#include "postgres.h"

#include "nodes/execnodes.h"
#include "executor/executor.h"
#include "executor/nodeTableFuncscan.h"
#include "executor/tablefunc.h"
#include "miscadmin.h"
#include "nodes/execnodes.h"
#include "utils/builtins.h"
#include "utils/lsyscache.h"
#include "utils/memutils.h"
#include "utils/xml.h"


static TupleTableSlot *TableFuncNext(TableFuncScanState *node);
static bool TableFuncRecheck(TableFuncScanState *node, TupleTableSlot *slot);


+ 1
- 1
src/backend/executor/nodeWindowAgg.c View File

@@ -46,8 +46,8 @@
#include "parser/parse_coerce.h"
#include "utils/acl.h"
#include "utils/builtins.h"
#include "utils/expandeddatum.h"
#include "utils/datum.h"
#include "utils/expandeddatum.h"
#include "utils/lsyscache.h"
#include "utils/memutils.h"
#include "utils/regproc.h"

+ 2
- 5
src/backend/jit/jit.c View File

@@ -17,19 +17,16 @@
*/
#include "postgres.h"


#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>


#include "fmgr.h"
#include "executor/execExpr.h"
#include "fmgr.h"
#include "jit/jit.h"
#include "miscadmin.h"
#include "utils/resowner_private.h"
#include "utils/fmgrprotos.h"
#include "utils/resowner_private.h"

/* GUCs */
bool jit_enabled = true;

+ 7
- 11
src/backend/jit/llvm/llvmjit.c View File

@@ -13,17 +13,6 @@

#include "postgres.h"

#include "jit/llvmjit.h"
#include "jit/llvmjit_emit.h"

#include "miscadmin.h"

#include "utils/memutils.h"
#include "utils/resowner_private.h"
#include "portability/instr_time.h"
#include "storage/ipc.h"


#include <llvm-c/Analysis.h>
#include <llvm-c/BitReader.h>
#include <llvm-c/BitWriter.h>
@@ -39,6 +28,13 @@
#include <llvm-c/Transforms/Utils.h>
#endif

#include "jit/llvmjit.h"
#include "jit/llvmjit_emit.h"
#include "miscadmin.h"
#include "portability/instr_time.h"
#include "storage/ipc.h"
#include "utils/memutils.h"
#include "utils/resowner_private.h"

/* Handle of a module emitted via ORC JIT */
typedef struct LLVMJitHandle

+ 1
- 2
src/backend/jit/llvm/llvmjit_expr.c View File

@@ -23,10 +23,10 @@
#include "access/tupconvert.h"
#include "catalog/objectaccess.h"
#include "catalog/pg_type.h"
#include "executor/execExpr.h"
#include "executor/execdebug.h"
#include "executor/nodeAgg.h"
#include "executor/nodeSubplan.h"
#include "executor/execExpr.h"
#include "funcapi.h"
#include "jit/llvmjit.h"
#include "jit/llvmjit_emit.h"
@@ -46,7 +46,6 @@
#include "utils/typcache.h"
#include "utils/xml.h"


typedef struct CompiledExprState
{
LLVMJitContext *context;

+ 2
- 3
src/backend/libpq/be-secure.c View File

@@ -32,11 +32,10 @@
#include "libpq/libpq.h"
#include "miscadmin.h"
#include "pgstat.h"
#include "tcop/tcopprot.h"
#include "utils/memutils.h"
#include "storage/ipc.h"
#include "storage/proc.h"

#include "tcop/tcopprot.h"
#include "utils/memutils.h"

char *ssl_library;
char *ssl_cert_file;

+ 1
- 1
src/backend/libpq/hba.c View File

@@ -39,10 +39,10 @@
#include "storage/fd.h"
#include "utils/acl.h"
#include "utils/builtins.h"
#include "utils/varlena.h"
#include "utils/guc.h"
#include "utils/lsyscache.h"
#include "utils/memutils.h"
#include "utils/varlena.h"

#ifdef USE_LDAP
#ifdef WIN32

+ 1
- 2
src/backend/nodes/nodeFuncs.c View File

@@ -17,14 +17,13 @@
#include "catalog/pg_collation.h"
#include "catalog/pg_type.h"
#include "miscadmin.h"
#include "nodes/makefuncs.h"
#include "nodes/execnodes.h"
#include "nodes/makefuncs.h"
#include "nodes/nodeFuncs.h"
#include "nodes/pathnodes.h"
#include "utils/builtins.h"
#include "utils/lsyscache.h"


static bool expression_returns_set_walker(Node *node, void *context);
static int leftmostLoc(int loc1, int loc2);
static bool fix_opfuncids_walker(Node *node, void *context);

+ 1
- 1
src/backend/optimizer/geqo/geqo_cx.c View File

@@ -35,8 +35,8 @@


#include "postgres.h"
#include "optimizer/geqo_recombination.h"
#include "optimizer/geqo_random.h"
#include "optimizer/geqo_recombination.h"

#if defined(CX)


+ 1
- 1
src/backend/optimizer/geqo/geqo_erx.c View File

@@ -32,8 +32,8 @@


#include "postgres.h"
#include "optimizer/geqo_recombination.h"
#include "optimizer/geqo_random.h"
#include "optimizer/geqo_recombination.h"

#if defined(ERX)


+ 1
- 2
src/backend/optimizer/path/clausesel.c View File

@@ -21,11 +21,10 @@
#include "optimizer/optimizer.h"
#include "optimizer/pathnode.h"
#include "optimizer/plancat.h"
#include "statistics/statistics.h"
#include "utils/fmgroids.h"
#include "utils/lsyscache.h"
#include "utils/selfuncs.h"
#include "statistics/statistics.h"


/*
* Data structure for accumulating info about possible range-query

+ 1
- 2
src/backend/optimizer/plan/initsplan.c View File

@@ -14,8 +14,8 @@
*/
#include "postgres.h"

#include "catalog/pg_type.h"
#include "catalog/pg_class.h"
#include "catalog/pg_type.h"
#include "nodes/makefuncs.h"
#include "nodes/nodeFuncs.h"
#include "optimizer/clauses.h"
@@ -34,7 +34,6 @@
#include "rewrite/rewriteManip.h"
#include "utils/lsyscache.h"


/* These parameters are set by GUC */
int from_collapse_limit;
int join_collapse_limit;

+ 1
- 2
src/backend/optimizer/plan/planagg.c View File

@@ -41,13 +41,12 @@
#include "optimizer/planmain.h"
#include "optimizer/subselect.h"
#include "optimizer/tlist.h"
#include "parser/parsetree.h"
#include "parser/parse_clause.h"
#include "parser/parsetree.h"
#include "rewrite/rewriteManip.h"
#include "utils/lsyscache.h"
#include "utils/syscache.h"


static bool find_minmax_aggs_walker(Node *node, List **context);
static bool build_minmax_path(PlannerInfo *root, MinMaxAggInfo *mminfo,
Oid eqop, Oid sortop, bool nulls_first);

+ 3
- 4
src/backend/optimizer/plan/planner.c View File

@@ -31,10 +31,10 @@
#include "executor/executor.h"
#include "executor/nodeAgg.h"
#include "foreign/fdwapi.h"
#include "miscadmin.h"
#include "jit/jit.h"
#include "lib/bipartite_match.h"
#include "lib/knapsack.h"
#include "miscadmin.h"
#include "nodes/makefuncs.h"
#include "nodes/nodeFuncs.h"
#ifdef OPTIMIZER_DEBUG
@@ -55,17 +55,16 @@
#include "optimizer/subselect.h"
#include "optimizer/tlist.h"
#include "parser/analyze.h"
#include "parser/parsetree.h"
#include "parser/parse_agg.h"
#include "parser/parsetree.h"
#include "partitioning/partdesc.h"
#include "rewrite/rewriteManip.h"
#include "storage/dsm_impl.h"
#include "utils/lsyscache.h"
#include "utils/rel.h"
#include "utils/selfuncs.h"
#include "utils/lsyscache.h"
#include "utils/syscache.h"


/* GUC parameters */
double cursor_tuple_fraction = DEFAULT_CURSOR_TUPLE_FRACTION;
int force_parallel_mode = FORCE_PARALLEL_OFF;

+ 1
- 2
src/backend/optimizer/prep/preptlist.c View File

@@ -47,12 +47,11 @@
#include "optimizer/optimizer.h"
#include "optimizer/prep.h"
#include "optimizer/tlist.h"
#include "parser/parsetree.h"
#include "parser/parse_coerce.h"
#include "parser/parsetree.h"
#include "rewrite/rewriteHandler.h"
#include "utils/rel.h"


static List *expand_targetlist(List *tlist, int command_type,
Index result_relation, Relation rel);


+ 1
- 2
src/backend/optimizer/util/pathnode.c View File

@@ -16,8 +16,8 @@

#include <math.h>

#include "miscadmin.h"
#include "foreign/fdwapi.h"
#include "miscadmin.h"
#include "nodes/extensible.h"
#include "nodes/nodeFuncs.h"
#include "optimizer/appendinfo.h"
@@ -35,7 +35,6 @@
#include "utils/memutils.h"
#include "utils/selfuncs.h"


typedef enum
{
COSTS_EQUAL, /* path costs are fuzzily equal */

+ 3
- 4
src/backend/optimizer/util/plancat.c View File

@@ -20,9 +20,9 @@
#include "access/genam.h"
#include "access/htup_details.h"
#include "access/nbtree.h"
#include "access/tableam.h"
#include "access/sysattr.h"
#include "access/table.h"
#include "access/tableam.h"
#include "access/transam.h"
#include "access/xlog.h"
#include "catalog/catalog.h"
@@ -40,9 +40,9 @@
#include "optimizer/optimizer.h"
#include "optimizer/plancat.h"
#include "optimizer/prep.h"
#include "partitioning/partdesc.h"
#include "parser/parse_relation.h"
#include "parser/parsetree.h"
#include "partitioning/partdesc.h"
#include "rewrite/rewriteManip.h"
#include "statistics/statistics.h"
#include "storage/bufmgr.h"
@@ -50,9 +50,8 @@
#include "utils/lsyscache.h"
#include "utils/partcache.h"
#include "utils/rel.h"
#include "utils/syscache.h"
#include "utils/snapmgr.h"
#include "utils/syscache.h"

/* GUC parameter */
int constraint_exclusion = CONSTRAINT_EXCLUSION_PARTITION;

+ 5
- 7
src/backend/parser/parse_clause.c View File

@@ -15,8 +15,6 @@

#include "postgres.h"

#include "miscadmin.h"

#include "access/htup_details.h"
#include "access/nbtree.h"
#include "access/table.h"
@@ -29,12 +27,11 @@
#include "catalog/pg_constraint.h"
#include "catalog/pg_type.h"
#include "commands/defrem.h"
#include "miscadmin.h"
#include "nodes/makefuncs.h"
#include "nodes/nodeFuncs.h"
#include "optimizer/optimizer.h"
#include "parser/analyze.h"
#include "parser/parsetree.h"
#include "parser/parser.h"
#include "parser/parse_clause.h"
#include "parser/parse_coerce.h"
#include "parser/parse_collate.h"
@@ -44,14 +41,15 @@
#include "parser/parse_relation.h"
#include "parser/parse_target.h"
#include "parser/parse_type.h"
#include "parser/parser.h"
#include "parser/parsetree.h"
#include "rewrite/rewriteManip.h"
#include "utils/builtins.h"
#include "utils/guc.h"
#include "utils/catcache.h"
#include "utils/guc.h"
#include "utils/lsyscache.h"
#include "utils/syscache.h"
#include "utils/rel.h"
#include "utils/syscache.h"

/* Convenience macro for the most common makeNamespaceItem() case */
#define makeDefaultNSItem(rte) makeNamespaceItem(rte, true, true, false, true)

+ 1
- 2
src/backend/parser/parse_expr.c View File

@@ -22,6 +22,7 @@
#include "nodes/nodeFuncs.h"
#include "optimizer/optimizer.h"
#include "parser/analyze.h"
#include "parser/parse_agg.h"
#include "parser/parse_clause.h"
#include "parser/parse_coerce.h"
#include "parser/parse_collate.h"
@@ -31,14 +32,12 @@
#include "parser/parse_relation.h"
#include "parser/parse_target.h"
#include "parser/parse_type.h"
#include "parser/parse_agg.h"
#include "utils/builtins.h"
#include "utils/date.h"
#include "utils/lsyscache.h"
#include "utils/timestamp.h"
#include "utils/xml.h"


/* GUC parameters */
bool operator_precedence_warning = false;
bool Transform_null_equals = false;

+ 1
- 2
src/backend/parser/parse_node.c View File

@@ -20,17 +20,16 @@
#include "mb/pg_wchar.h"
#include "nodes/makefuncs.h"
#include "nodes/nodeFuncs.h"
#include "parser/parsetree.h"
#include "parser/parse_coerce.h"
#include "parser/parse_expr.h"
#include "parser/parse_relation.h"
#include "parser/parsetree.h"
#include "utils/builtins.h"
#include "utils/int8.h"
#include "utils/lsyscache.h"
#include "utils/syscache.h"
#include "utils/varbit.h"


static void pcb_error_callback(void *arg);



+ 1
- 2
src/backend/parser/parse_relation.c View File

@@ -26,10 +26,10 @@
#include "funcapi.h"
#include "nodes/makefuncs.h"
#include "nodes/nodeFuncs.h"
#include "parser/parsetree.h"
#include "parser/parse_enr.h"
#include "parser/parse_relation.h"
#include "parser/parse_type.h"
#include "parser/parsetree.h"
#include "storage/lmgr.h"
#include "utils/builtins.h"
#include "utils/lsyscache.h"
@@ -37,7 +37,6 @@
#include "utils/syscache.h"
#include "utils/varlena.h"


#define MAX_FUZZY_DISTANCE 3

static RangeTblEntry *scanNameSpaceForRefname(ParseState *pstate,

+ 1
- 2
src/backend/parser/parse_target.c View File

@@ -20,19 +20,18 @@
#include "miscadmin.h"
#include "nodes/makefuncs.h"
#include "nodes/nodeFuncs.h"
#include "parser/parsetree.h"
#include "parser/parse_coerce.h"
#include "parser/parse_expr.h"
#include "parser/parse_func.h"
#include "parser/parse_relation.h"
#include "parser/parse_target.h"
#include "parser/parse_type.h"
#include "parser/parsetree.h"
#include "utils/builtins.h"
#include "utils/lsyscache.h"
#include "utils/rel.h"
#include "utils/typcache.h"


static void markTargetListOrigin(ParseState *pstate, TargetEntry *tle,
Var *var, int levelsup);
static Node *transformAssignmentIndirection(ParseState *pstate,

+ 1
- 2
src/backend/parser/parse_type.c View File

@@ -19,14 +19,13 @@
#include "catalog/pg_type.h"
#include "lib/stringinfo.h"
#include "nodes/makefuncs.h"
#include "parser/parser.h"
#include "parser/parse_type.h"
#include "parser/parser.h"
#include "utils/array.h"
#include "utils/builtins.h"
#include "utils/lsyscache.h"
#include "utils/syscache.h"


static int32 typenameTypeMod(ParseState *pstate, const TypeName *typeName,
Type typ);


+ 1
- 2
src/backend/parser/scansup.c View File

@@ -17,9 +17,8 @@

#include <ctype.h>

#include "parser/scansup.h"
#include "mb/pg_wchar.h"
#include "parser/scansup.h"

/* ----------------
* scanstr

+ 1
- 1
src/backend/partitioning/partbounds.c View File

@@ -36,8 +36,8 @@
#include "utils/lsyscache.h"
#include "utils/partcache.h"
#include "utils/rel.h"
#include "utils/snapmgr.h"
#include "utils/ruleutils.h"
#include "utils/snapmgr.h"
#include "utils/syscache.h"

/*

+ 2
- 2
src/backend/partitioning/partdesc.c View File

@@ -25,13 +25,13 @@
#include "storage/bufmgr.h"
#include "storage/sinval.h"
#include "utils/builtins.h"
#include "utils/inval.h"
#include "utils/fmgroids.h"
#include "utils/hsearch.h"
#include "utils/inval.h"
#include "utils/lsyscache.h"
#include "utils/memutils.h"
#include "utils/rel.h"
#include "utils/partcache.h"
#include "utils/rel.h"