From d10bd21cdb78780d7da8dbc4b5e1e26506bc1425 Mon Sep 17 00:00:00 2001
From: vignesh <vignesh@localhost.localdomain>
Date: Mon, 21 Oct 2019 22:03:52 +0530
Subject: [PATCH 2/3] Ordering of header files in backend dir.

Ordering of header files that is included in source code in backend dir.
---
 src/backend/access/brin/brin_minmax.c              |  5 ++--
 src/backend/access/brin/brin_pageops.c             |  3 +--
 src/backend/access/brin/brin_tuple.c               |  3 +--
 src/backend/access/brin/brin_validate.c            |  3 +--
 src/backend/access/gin/ginbtree.c                  |  2 +-
 src/backend/access/gin/ginfast.c                   | 10 ++++----
 src/backend/access/gin/gininsert.c                 |  5 ++--
 src/backend/access/gin/ginvalidate.c               |  3 +--
 src/backend/access/gist/gist.c                     |  3 +--
 src/backend/access/gist/gistget.c                  |  4 +--
 src/backend/access/gist/gistutil.c                 |  5 ++--
 src/backend/access/hash/hash.c                     |  2 --
 src/backend/access/hash/hash_xlog.c                |  6 ++---
 src/backend/access/hash/hashinsert.c               |  4 +--
 src/backend/access/hash/hashpage.c                 |  3 +--
 src/backend/access/hash/hashsearch.c               |  2 +-
 src/backend/access/hash/hashutil.c                 |  2 +-
 src/backend/access/heap/heapam_handler.c           |  5 +---
 src/backend/access/heap/pruneheap.c                |  4 +--
 src/backend/access/heap/rewriteheap.c              | 12 ++-------
 src/backend/access/nbtree/nbtxlog.c                |  2 +-
 src/backend/access/spgist/spgquadtreeproc.c        |  3 +--
 src/backend/access/transam/clog.c                  |  2 +-
 src/backend/access/transam/parallel.c              |  3 +--
 src/backend/access/transam/rmgr.c                  |  4 +--
 src/backend/access/transam/slru.c                  |  3 +--
 src/backend/access/transam/twophase.c              |  3 +--
 src/backend/access/transam/xact.c                  |  3 +--
 src/backend/access/transam/xlog.c                  |  6 ++---
 src/backend/access/transam/xlogfuncs.c             |  7 +++--
 src/backend/access/transam/xloginsert.c            |  2 +-
 src/backend/access/transam/xlogreader.c            |  3 +--
 src/backend/catalog/aclchk.c                       |  5 ++--
 src/backend/catalog/catalog.c                      |  3 +--
 src/backend/catalog/index.c                        |  7 +++--
 src/backend/catalog/objectaddress.c                | 10 ++++----
 src/backend/catalog/partition.c                    |  3 +--
 src/backend/catalog/pg_enum.c                      |  3 +--
 src/backend/catalog/pg_publication.c               |  9 +++----
 src/backend/catalog/pg_shdepend.c                  |  7 +++--
 src/backend/catalog/pg_subscription.c              | 10 ++------
 src/backend/catalog/pg_type.c                      |  2 +-
 src/backend/catalog/storage.c                      |  3 +--
 src/backend/commands/alter.c                       |  5 ++--
 src/backend/commands/cluster.c                     |  5 ++--
 src/backend/commands/copy.c                        |  3 +--
 src/backend/commands/createas.c                    |  3 +--
 src/backend/commands/dbcommands.c                  |  3 +--
 src/backend/commands/event_trigger.c               |  6 ++---
 src/backend/commands/functioncmds.c                |  2 +-
 src/backend/commands/lockcmds.c                    |  4 +--
 src/backend/commands/opclasscmds.c                 |  3 +--
 src/backend/commands/policy.c                      |  2 +-
 src/backend/commands/publicationcmds.c             | 10 +++-----
 src/backend/commands/schemacmds.c                  |  3 +--
 src/backend/commands/subscriptioncmds.c            | 12 ++-------
 src/backend/commands/tablecmds.c                   |  2 --
 src/backend/commands/tablespace.c                  |  3 +--
 src/backend/commands/variable.c                    |  4 +--
 src/backend/commands/view.c                        |  3 +--
 src/backend/executor/execAmi.c                     |  2 --
 src/backend/executor/execExprInterp.c              |  5 ++--
 src/backend/executor/execGrouping.c                |  2 +-
 src/backend/executor/execParallel.c                |  4 +--
 src/backend/executor/execProcnode.c                |  3 +--
 src/backend/executor/execTuples.c                  |  3 +--
 src/backend/executor/nodeAgg.c                     |  3 +--
 src/backend/executor/nodeBitmapHeapscan.c          |  3 +--
 src/backend/executor/nodeCustom.c                  |  3 +--
 src/backend/executor/nodeHash.c                    |  3 +--
 src/backend/executor/nodeSubplan.c                 |  3 +--
 src/backend/executor/nodeTableFuncscan.c           |  3 +--
 src/backend/executor/nodeWindowAgg.c               |  2 +-
 src/backend/jit/jit.c                              |  7 ++---
 src/backend/jit/llvm/llvmjit_expr.c                |  3 +--
 src/backend/libpq/hba.c                            |  2 +-
 src/backend/nodes/nodeFuncs.c                      |  3 +--
 src/backend/optimizer/geqo/geqo_cx.c               |  2 +-
 src/backend/optimizer/geqo/geqo_erx.c              |  2 +-
 src/backend/optimizer/path/clausesel.c             |  3 +--
 src/backend/optimizer/plan/initsplan.c             |  3 +--
 src/backend/optimizer/plan/planagg.c               |  3 +--
 src/backend/optimizer/plan/planner.c               |  7 +++--
 src/backend/optimizer/prep/preptlist.c             |  3 +--
 src/backend/optimizer/util/pathnode.c              |  3 +--
 src/backend/optimizer/util/plancat.c               |  7 +++--
 src/backend/parser/parse_clause.c                  | 12 ++++-----
 src/backend/parser/parse_expr.c                    |  3 +--
 src/backend/parser/parse_node.c                    |  3 +--
 src/backend/parser/parse_relation.c                |  3 +--
 src/backend/parser/parse_target.c                  |  3 +--
 src/backend/parser/parse_type.c                    |  3 +--
 src/backend/parser/scansup.c                       |  3 +--
 src/backend/partitioning/partbounds.c              |  2 +-
 src/backend/partitioning/partdesc.c                |  4 +--
 src/backend/postmaster/bgworker.c                  |  2 +-
 src/backend/postmaster/bgwriter.c                  |  3 +--
 src/backend/postmaster/pgstat.c                    |  4 +--
 src/backend/replication/basebackup.c               |  3 +--
 .../libpqwalreceiver/libpqwalreceiver.c            |  4 +--
 src/backend/replication/logical/decode.c           |  7 ++---
 src/backend/replication/logical/launcher.c         | 16 +++---------
 src/backend/replication/logical/logical.c          | 10 +++-----
 src/backend/replication/logical/logicalfuncs.c     | 30 ++++++++--------------
 src/backend/replication/logical/message.c          |  9 ++-----
 src/backend/replication/logical/origin.c           | 18 +++++--------
 src/backend/replication/logical/snapbuild.c        | 15 ++++-------
 src/backend/replication/logical/tablesync.c        | 13 +++-------
 src/backend/replication/pgoutput/pgoutput.c        |  5 +---
 src/backend/replication/slotfuncs.c                |  2 +-
 src/backend/rewrite/rowsecurity.c                  |  2 +-
 src/backend/statistics/dependencies.c              |  4 +--
 src/backend/statistics/mvdistinct.c                |  7 +++--
 src/backend/storage/buffer/buf_init.c              |  3 +--
 src/backend/storage/buffer/buf_table.c             |  3 +--
 src/backend/storage/file/buffile.c                 |  4 +--
 src/backend/storage/file/copydir.c                 |  4 +--
 src/backend/storage/file/fd.c                      |  3 +--
 src/backend/storage/ipc/dsm_impl.c                 |  6 ++---
 src/backend/storage/ipc/ipci.c                     |  2 +-
 src/backend/storage/ipc/procsignal.c               |  3 +--
 src/backend/storage/ipc/sinvaladt.c                |  3 +--
 src/backend/storage/lmgr/lwlock.c                  |  2 +-
 src/backend/storage/lmgr/proc.c                    |  3 +--
 src/backend/storage/lmgr/s_lock.c                  |  3 +--
 src/backend/storage/page/checksum.c                |  1 -
 src/backend/storage/smgr/md.c                      |  8 +++---
 src/backend/storage/sync/sync.c                    |  8 +++---
 src/backend/tcop/postgres.c                        |  7 +++--
 src/backend/tcop/utility.c                         |  7 +++--
 src/backend/tsearch/wparser.c                      |  3 +--
 src/backend/utils/adt/acl.c                        |  5 ++--
 src/backend/utils/adt/datetime.c                   |  1 -
 src/backend/utils/adt/format_type.c                |  2 +-
 src/backend/utils/adt/int8.c                       |  3 +--
 src/backend/utils/adt/json.c                       |  4 +--
 src/backend/utils/adt/jsonb.c                      |  4 +--
 src/backend/utils/adt/jsonpath_exec.c              |  5 ++--
 src/backend/utils/adt/misc.c                       |  7 +++--
 src/backend/utils/adt/oracle_compat.c              |  3 +--
 src/backend/utils/adt/rangetypes_gist.c            |  3 +--
 src/backend/utils/adt/regproc.c                    |  4 +--
 src/backend/utils/adt/ri_triggers.c                |  3 +--
 src/backend/utils/adt/ruleutils.c                  |  3 +--
 src/backend/utils/adt/tsquery.c                    |  2 +-
 src/backend/utils/adt/tsquery_cleanup.c            |  2 +-
 src/backend/utils/adt/tsquery_gist.c               |  2 +-
 src/backend/utils/adt/tsquery_util.c               |  2 +-
 src/backend/utils/adt/tsrank.c                     |  3 +--
 src/backend/utils/adt/txid.c                       |  3 +--
 src/backend/utils/adt/varchar.c                    |  3 +--
 src/backend/utils/cache/evtcache.c                 |  4 +--
 src/backend/utils/cache/relcache.c                 |  3 +--
 src/backend/utils/cache/relfilenodemap.c           |  2 +-
 src/backend/utils/cache/syscache.c                 |  3 +--
 .../utf8_and_cyrillic/utf8_and_cyrillic.c          |  2 +-
 .../utf8_and_iso8859/utf8_and_iso8859.c            |  3 ++-
 src/backend/utils/misc/guc.c                       |  8 +++---
 src/backend/utils/misc/pg_config.c                 |  6 ++---
 src/backend/utils/misc/pg_controldata.c            |  2 +-
 src/backend/utils/misc/ps_status.c                 |  2 +-
 src/backend/utils/misc/superuser.c                 |  3 +--
 src/backend/utils/mmgr/slab.c                      |  3 +--
 src/backend/utils/time/combocid.c                  |  3 +--
 164 files changed, 271 insertions(+), 449 deletions(-)

diff --git a/src/backend/access/brin/brin_minmax.c b/src/backend/access/brin/brin_minmax.c
index ad0d18e..655c0b5 100644
--- a/src/backend/access/brin/brin_minmax.c
+++ b/src/backend/access/brin/brin_minmax.c
@@ -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;
diff --git a/src/backend/access/brin/brin_pageops.c b/src/backend/access/brin/brin_pageops.c
index f907b4b..c4cbe84 100644
--- a/src/backend/access/brin/brin_pageops.c
+++ b/src/backend/access/brin/brin_pageops.c
@@ -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.
diff --git a/src/backend/access/brin/brin_tuple.c b/src/backend/access/brin/brin_tuple.c
index 2b38617..6d24e53 100644
--- a/src/backend/access/brin/brin_tuple.c
+++ b/src/backend/access/brin/brin_tuple.c
@@ -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);
diff --git a/src/backend/access/brin/brin_validate.c b/src/backend/access/brin/brin_validate.c
index 0129338..02337a7 100644
--- a/src/backend/access/brin/brin_validate.c
+++ b/src/backend/access/brin/brin_validate.c
@@ -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.
diff --git a/src/backend/access/gin/ginbtree.c b/src/backend/access/gin/ginbtree.c
index 4c29261..20adfa2 100644
--- a/src/backend/access/gin/ginbtree.c
+++ b/src/backend/access/gin/ginbtree.c
@@ -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"
 
diff --git a/src/backend/access/gin/ginfast.c b/src/backend/access/gin/ginfast.c
index 439a91b..3d2153b 100644
--- a/src/backend/access/gin/ginfast.c
+++ b/src/backend/access/gin/ginfast.c
@@ -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;
diff --git a/src/backend/access/gin/gininsert.c b/src/backend/access/gin/gininsert.c
index 55eab14..bdb3d5f 100644
--- a/src/backend/access/gin/gininsert.c
+++ b/src/backend/access/gin/gininsert.c
@@ -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;
diff --git a/src/backend/access/gin/ginvalidate.c b/src/backend/access/gin/ginvalidate.c
index 63bd7f2..5d96f29 100644
--- a/src/backend/access/gin/ginvalidate.c
+++ b/src/backend/access/gin/ginvalidate.c
@@ -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.
diff --git a/src/backend/access/gist/gist.c b/src/backend/access/gist/gist.c
index 0cc8791..8d9c8d0 100644
--- a/src/backend/access/gist/gist.c
+++ b/src/backend/access/gist/gist.c
@@ -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,
diff --git a/src/backend/access/gist/gistget.c b/src/backend/access/gist/gistget.c
index 22d790d..98b6892 100644
--- a/src/backend/access/gist/gistget.c
+++ b/src/backend/access/gist/gistget.c
@@ -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"
diff --git a/src/backend/access/gist/gistutil.c b/src/backend/access/gist/gistutil.c
index 45804d7..bf2e848 100644
--- a/src/backend/access/gist/gistutil.c
+++ b/src/backend/access/gist/gistutil.c
@@ -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.
diff --git a/src/backend/access/hash/hash.c b/src/backend/access/hash/hash.c
index 5cc30da..cdb6fa9 100644
--- a/src/backend/access/hash/hash.c
+++ b/src/backend/access/hash/hash.c
@@ -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
diff --git a/src/backend/access/hash/hash_xlog.c b/src/backend/access/hash/hash_xlog.c
index 86e7210..c1d248a 100644
--- a/src/backend/access/hash/hash_xlog.c
+++ b/src/backend/access/hash/hash_xlog.c
@@ -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
diff --git a/src/backend/access/hash/hashinsert.c b/src/backend/access/hash/hashinsert.c
index 89876d2..e0ca1b0 100644
--- a/src/backend/access/hash/hashinsert.c
+++ b/src/backend/access/hash/hashinsert.c
@@ -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);
diff --git a/src/backend/access/hash/hashpage.c b/src/backend/access/hash/hashpage.c
index 838ee68..63697bf 100644
--- a/src/backend/access/hash/hashpage.c
+++ b/src/backend/access/hash/hashpage.c
@@ -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);
diff --git a/src/backend/access/hash/hashsearch.c b/src/backend/access/hash/hashsearch.c
index 79ae499..725e614 100644
--- a/src/backend/access/hash/hashsearch.c
+++ b/src/backend/access/hash/hashsearch.c
@@ -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);
diff --git a/src/backend/access/hash/hashutil.c b/src/backend/access/hash/hashutil.c
index 3fb92ea..c5005f4 100644
--- a/src/backend/access/hash/hashutil.c
+++ b/src/backend/access/hash/hashutil.c
@@ -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)
diff --git a/src/backend/access/heap/heapam_handler.c b/src/backend/access/heap/heapam_handler.c
index 2dd8821..2c70a87 100644
--- a/src/backend/access/heap/heapam_handler.c
+++ b/src/backend/access/heap/heapam_handler.c
@@ -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);
diff --git a/src/backend/access/heap/pruneheap.c b/src/backend/access/heap/pruneheap.c
index a0d2217..6d62a96 100644
--- a/src/backend/access/heap/pruneheap.c
+++ b/src/backend/access/heap/pruneheap.c
@@ -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
diff --git a/src/backend/access/heap/rewriteheap.c b/src/backend/access/heap/rewriteheap.c
index 306e74e..c1e7d38 100644
--- a/src/backend/access/heap/rewriteheap.c
+++ b/src/backend/access/heap/rewriteheap.c
@@ -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.
diff --git a/src/backend/access/nbtree/nbtxlog.c b/src/backend/access/nbtree/nbtxlog.c
index dd5315c..44f6283 100644
--- a/src/backend/access/nbtree/nbtxlog.c
+++ b/src/backend/access/nbtree/nbtxlog.c
@@ -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
diff --git a/src/backend/access/spgist/spgquadtreeproc.c b/src/backend/access/spgist/spgquadtreeproc.c
index e50108e..992c558 100644
--- a/src/backend/access/spgist/spgquadtreeproc.c
+++ b/src/backend/access/spgist/spgquadtreeproc.c
@@ -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)
 {
diff --git a/src/backend/access/transam/clog.c b/src/backend/access/transam/clog.c
index 595c860..7f7eb21 100644
--- a/src/backend/access/transam/clog.c
+++ b/src/backend/access/transam/clog.c
@@ -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"
 
 /*
diff --git a/src/backend/access/transam/parallel.c b/src/backend/access/transam/parallel.c
index 55d129a..d147236 100644
--- a/src/backend/access/transam/parallel.c
+++ b/src/backend/access/transam/parallel.c
@@ -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
diff --git a/src/backend/access/transam/rmgr.c b/src/backend/access/transam/rmgr.c
index 9368b56..58091f6 100644
--- a/src/backend/access/transam/rmgr.c
+++ b/src/backend/access/transam/rmgr.c
@@ -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"
diff --git a/src/backend/access/transam/slru.c b/src/backend/access/transam/slru.c
index e38f919..59bad09 100644
--- a/src/backend/access/transam/slru.c
+++ b/src/backend/access/transam/slru.c
@@ -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)
diff --git a/src/backend/access/transam/twophase.c b/src/backend/access/transam/twophase.c
index 546bd43..712e842 100644
--- a/src/backend/access/transam/twophase.c
+++ b/src/backend/access/transam/twophase.c
@@ -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
  */
diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c
index fc55fa6..c3a75a5 100644
--- a/src/backend/access/transam/xact.c
+++ b/src/backend/access/transam/xact.c
@@ -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
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index b602e28..bfc9dce 100644
--- a/src/backend/access/transam/xlog.c
+++ b/src/backend/access/transam/xlog.c
@@ -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;
 
diff --git a/src/backend/access/transam/xlogfuncs.c b/src/backend/access/transam/xlogfuncs.c
index 8f17988..1fccf29 100644
--- a/src/backend/access/transam/xlogfuncs.c
+++ b/src/backend/access/transam/xlogfuncs.c
@@ -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.
diff --git a/src/backend/access/transam/xloginsert.c b/src/backend/access/transam/xloginsert.c
index 3ec67d4..aa9dca0 100644
--- a/src/backend/access/transam/xloginsert.c
+++ b/src/backend/access/transam/xloginsert.c
@@ -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)
diff --git a/src/backend/access/transam/xlogreader.c b/src/backend/access/transam/xlogreader.c
index c8b0d23..fb25864 100644
--- a/src/backend/access/transam/xlogreader.c
+++ b/src/backend/access/transam/xlogreader.c
@@ -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);
diff --git a/src/backend/catalog/aclchk.c b/src/backend/catalog/aclchk.c
index 88ce37c..bed10f9 100644
--- a/src/backend/catalog/aclchk.c
+++ b/src/backend/catalog/aclchk.c
@@ -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.
  */
diff --git a/src/backend/catalog/catalog.c b/src/backend/catalog/catalog.c
index 1af31c2..6b10469 100644
--- a/src/backend/catalog/catalog.c
+++ b/src/backend/catalog/catalog.c
@@ -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.
diff --git a/src/backend/catalog/index.c b/src/backend/catalog/index.c
index c48ad93..3508199 100644
--- a/src/backend/catalog/index.c
+++ b/src/backend/catalog/index.c
@@ -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;
diff --git a/src/backend/catalog/objectaddress.c b/src/backend/catalog/objectaddress.c
index ce8a4e9..3544bd0 100644
--- a/src/backend/catalog/objectaddress.c
+++ b/src/backend/catalog/objectaddress.c
@@ -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"
diff --git a/src/backend/catalog/partition.c b/src/backend/catalog/partition.c
index 53af14e..5dfa449 100644
--- a/src/backend/catalog/partition.c
+++ b/src/backend/catalog/partition.c
@@ -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);
diff --git a/src/backend/catalog/pg_enum.c b/src/backend/catalog/pg_enum.c
index d0ff802..be0f065 100644
--- a/src/backend/catalog/pg_enum.c
+++ b/src/backend/catalog/pg_enum.c
@@ -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;
 
diff --git a/src/backend/catalog/pg_publication.c b/src/backend/catalog/pg_publication.c
index fd5da7d..d442c8e 100644
--- a/src/backend/catalog/pg_publication.c
+++ b/src/backend/catalog/pg_publication.c
@@ -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"
diff --git a/src/backend/catalog/pg_shdepend.c b/src/backend/catalog/pg_shdepend.c
index fb7f8dd..59f97bf 100644
--- a/src/backend/catalog/pg_shdepend.c
+++ b/src/backend/catalog/pg_shdepend.c
@@ -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,
diff --git a/src/backend/catalog/pg_subscription.c b/src/backend/catalog/pg_subscription.c
index afee283..68d88ff 100644
--- a/src/backend/catalog/pg_subscription.c
+++ b/src/backend/catalog/pg_subscription.c
@@ -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);
 
 /*
diff --git a/src/backend/catalog/pg_type.c b/src/backend/catalog/pg_type.c
index 2a51501..a8c1de5 100644
--- a/src/backend/catalog/pg_type.c
+++ b/src/backend/catalog/pg_type.c
@@ -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"
diff --git a/src/backend/catalog/storage.c b/src/backend/catalog/storage.c
index b8c9b6f..e22dec1 100644
--- a/src/backend/catalog/storage.c
+++ b/src/backend/catalog/storage.c
@@ -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"
diff --git a/src/backend/commands/alter.c b/src/backend/commands/alter.c
index 70dbcb0..af1aca9 100644
--- a/src/backend/commands/alter.c
+++ b/src/backend/commands/alter.c
@@ -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);
 
 /*
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index a23128d..b8c349f 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -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
diff --git a/src/backend/commands/copy.c b/src/backend/commands/copy.c
index 3aeef30..7a866b5 100644
--- a/src/backend/commands/copy.c
+++ b/src/backend/commands/copy.c
@@ -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')
 
diff --git a/src/backend/commands/createas.c b/src/backend/commands/createas.c
index b7d2206..2bf7083 100644
--- a/src/backend/commands/createas.c
+++ b/src/backend/commands/createas.c
@@ -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 */
diff --git a/src/backend/commands/dbcommands.c b/src/backend/commands/dbcommands.c
index 01d6621..aa03172 100644
--- a/src/backend/commands/dbcommands.c
+++ b/src/backend/commands/dbcommands.c
@@ -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 */
diff --git a/src/backend/commands/event_trigger.c b/src/backend/commands/event_trigger.c
index f7ee983..8657df6 100644
--- a/src/backend/commands/event_trigger.c
+++ b/src/backend/commands/event_trigger.c
@@ -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
 {
diff --git a/src/backend/commands/functioncmds.c b/src/backend/commands/functioncmds.c
index 40f1f9a..94411b5 100644
--- a/src/backend/commands/functioncmds.c
+++ b/src/backend/commands/functioncmds.c
@@ -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"
diff --git a/src/backend/commands/lockcmds.c b/src/backend/commands/lockcmds.c
index bae3b38..2621e36 100644
--- a/src/backend/commands/lockcmds.c
+++ b/src/backend/commands/lockcmds.c
@@ -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);
diff --git a/src/backend/commands/opclasscmds.c b/src/backend/commands/opclasscmds.c
index 6a1ccde..cb7a6bd 100644
--- a/src/backend/commands/opclasscmds.c
+++ b/src/backend/commands/opclasscmds.c
@@ -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,
diff --git a/src/backend/commands/policy.c b/src/backend/commands/policy.c
index 1df7662..36093dc 100644
--- a/src/backend/commands/policy.c
+++ b/src/backend/commands/policy.c
@@ -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"
diff --git a/src/backend/commands/publicationcmds.c b/src/backend/commands/publicationcmds.c
index f115d4b..fbf11c8 100644
--- a/src/backend/commands/publicationcmds.c
+++ b/src/backend/commands/publicationcmds.c
@@ -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"
diff --git a/src/backend/commands/schemacmds.c b/src/backend/commands/schemacmds.c
index 6cf94a3..7cf3cc1 100644
--- a/src/backend/commands/schemacmds.c
+++ b/src/backend/commands/schemacmds.c
@@ -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);
 
 /*
diff --git a/src/backend/commands/subscriptioncmds.c b/src/backend/commands/subscriptioncmds.c
index 2e67a58..6b33cd6 100644
--- a/src/backend/commands/subscriptioncmds.c
+++ b/src/backend/commands/subscriptioncmds.c
@@ -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"
diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c
index 8d25d14..97acdb1 100644
--- a/src/backend/commands/tablecmds.c
+++ b/src/backend/commands/tablecmds.c
@@ -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
  */
diff --git a/src/backend/commands/tablespace.c b/src/backend/commands/tablespace.c
index 84efb41..570dcb2 100644
--- a/src/backend/commands/tablespace.c
+++ b/src/backend/commands/tablespace.c
@@ -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;
diff --git a/src/backend/commands/variable.c b/src/backend/commands/variable.c
index 1119e21..a0bd8c3 100644
--- a/src/backend/commands/variable.c
+++ b/src/backend/commands/variable.c
@@ -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
diff --git a/src/backend/commands/view.c b/src/backend/commands/view.c
index bea890f..9fa433a 100644
--- a/src/backend/commands/view.c
+++ b/src/backend/commands/view.c
@@ -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);
 
 /*---------------------------------------------------------------------
diff --git a/src/backend/executor/execAmi.c b/src/backend/executor/execAmi.c
index 1f18e5d..779d3dc 100644
--- a/src/backend/executor/execAmi.c
+++ b/src/backend/executor/execAmi.c
@@ -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);
 
 
diff --git a/src/backend/executor/execExprInterp.c b/src/backend/executor/execExprInterp.c
index 0cd6f65..dbed597 100644
--- a/src/backend/executor/execExprInterp.c
+++ b/src/backend/executor/execExprInterp.c
@@ -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
diff --git a/src/backend/executor/execGrouping.c b/src/backend/executor/execGrouping.c
index 6349c11..7bc5e40 100644
--- a/src/backend/executor/execGrouping.c
+++ b/src/backend/executor/execGrouping.c
@@ -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);
diff --git a/src/backend/executor/execParallel.c b/src/backend/executor/execParallel.c
index 53cd2fc..b256642 100644
--- a/src/backend/executor/execParallel.c
+++ b/src/backend/executor/execParallel.c
@@ -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
diff --git a/src/backend/executor/execProcnode.c b/src/backend/executor/execProcnode.c
index c227282..7a6e285 100644
--- a/src/backend/executor/execProcnode.c
+++ b/src/backend/executor/execProcnode.c
@@ -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);
diff --git a/src/backend/executor/execTuples.c b/src/backend/executor/execTuples.c
index 87bc510..da43057 100644
--- a/src/backend/executor/execTuples.c
+++ b/src/backend/executor/execTuples.c
@@ -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,
diff --git a/src/backend/executor/nodeAgg.c b/src/backend/executor/nodeAgg.c
index 58c376a..6ee24ea 100644
--- a/src/backend/executor/nodeAgg.c
+++ b/src/backend/executor/nodeAgg.c
@@ -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);
diff --git a/src/backend/executor/nodeBitmapHeapscan.c b/src/backend/executor/nodeBitmapHeapscan.c
index f62105f..256d61a 100644
--- a/src/backend/executor/nodeBitmapHeapscan.c
+++ b/src/backend/executor/nodeBitmapHeapscan.c
@@ -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);
diff --git a/src/backend/executor/nodeCustom.c b/src/backend/executor/nodeCustom.c
index 6dd0916..ccaa68b 100644
--- a/src/backend/executor/nodeCustom.c
+++ b/src/backend/executor/nodeCustom.c
@@ -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);
 
 
diff --git a/src/backend/executor/nodeHash.c b/src/backend/executor/nodeHash.c
index 224cbb3..d6f4eda 100644
--- a/src/backend/executor/nodeHash.c
+++ b/src/backend/executor/nodeHash.c
@@ -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);
diff --git a/src/backend/executor/nodeSubplan.c b/src/backend/executor/nodeSubplan.c
index 1991b90..2c364bd 100644
--- a/src/backend/executor/nodeSubplan.c
+++ b/src/backend/executor/nodeSubplan.c
@@ -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);
diff --git a/src/backend/executor/nodeTableFuncscan.c b/src/backend/executor/nodeTableFuncscan.c
index d264337..21cf3ca 100644
--- a/src/backend/executor/nodeTableFuncscan.c
+++ b/src/backend/executor/nodeTableFuncscan.c
@@ -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);
 
diff --git a/src/backend/executor/nodeWindowAgg.c b/src/backend/executor/nodeWindowAgg.c
index b5d3f3c..f1b9407 100644
--- a/src/backend/executor/nodeWindowAgg.c
+++ b/src/backend/executor/nodeWindowAgg.c
@@ -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"
diff --git a/src/backend/jit/jit.c b/src/backend/jit/jit.c
index 43e65b1..e066f72 100644
--- a/src/backend/jit/jit.c
+++ b/src/backend/jit/jit.c
@@ -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;
diff --git a/src/backend/jit/llvm/llvmjit_expr.c b/src/backend/jit/llvm/llvmjit_expr.c
index d093246..a9d3621 100644
--- a/src/backend/jit/llvm/llvmjit_expr.c
+++ b/src/backend/jit/llvm/llvmjit_expr.c
@@ -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;
diff --git a/src/backend/libpq/hba.c b/src/backend/libpq/hba.c
index 2221c04..7f59a29 100644
--- a/src/backend/libpq/hba.c
+++ b/src/backend/libpq/hba.c
@@ -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
diff --git a/src/backend/nodes/nodeFuncs.c b/src/backend/nodes/nodeFuncs.c
index b655931..bcada74 100644
--- a/src/backend/nodes/nodeFuncs.c
+++ b/src/backend/nodes/nodeFuncs.c
@@ -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);
diff --git a/src/backend/optimizer/geqo/geqo_cx.c b/src/backend/optimizer/geqo/geqo_cx.c
index a546908..3b8d2fe 100644
--- a/src/backend/optimizer/geqo/geqo_cx.c
+++ b/src/backend/optimizer/geqo/geqo_cx.c
@@ -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)
 
diff --git a/src/backend/optimizer/geqo/geqo_erx.c b/src/backend/optimizer/geqo/geqo_erx.c
index fbabe2e..3b92f42 100644
--- a/src/backend/optimizer/geqo/geqo_erx.c
+++ b/src/backend/optimizer/geqo/geqo_erx.c
@@ -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)
 
diff --git a/src/backend/optimizer/path/clausesel.c b/src/backend/optimizer/path/clausesel.c
index 4bf777d..fe02050 100644
--- a/src/backend/optimizer/path/clausesel.c
+++ b/src/backend/optimizer/path/clausesel.c
@@ -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
diff --git a/src/backend/optimizer/plan/initsplan.c b/src/backend/optimizer/plan/initsplan.c
index 274fea0..fa63a38 100644
--- a/src/backend/optimizer/plan/initsplan.c
+++ b/src/backend/optimizer/plan/initsplan.c
@@ -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;
diff --git a/src/backend/optimizer/plan/planagg.c b/src/backend/optimizer/plan/planagg.c
index 9381939..974f620 100644
--- a/src/backend/optimizer/plan/planagg.c
+++ b/src/backend/optimizer/plan/planagg.c
@@ -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);
diff --git a/src/backend/optimizer/plan/planner.c b/src/backend/optimizer/plan/planner.c
index 17c5f08..7fe11b5 100644
--- a/src/backend/optimizer/plan/planner.c
+++ b/src/backend/optimizer/plan/planner.c
@@ -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;
diff --git a/src/backend/optimizer/prep/preptlist.c b/src/backend/optimizer/prep/preptlist.c
index 792ae39..0da43ef 100644
--- a/src/backend/optimizer/prep/preptlist.c
+++ b/src/backend/optimizer/prep/preptlist.c
@@ -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);
 
diff --git a/src/backend/optimizer/util/pathnode.c b/src/backend/optimizer/util/pathnode.c
index 34acb73..60c93ee 100644
--- a/src/backend/optimizer/util/pathnode.c
+++ b/src/backend/optimizer/util/pathnode.c
@@ -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 */
diff --git a/src/backend/optimizer/util/plancat.c b/src/backend/optimizer/util/plancat.c
index e5f9e04..5e889d1 100644
--- a/src/backend/optimizer/util/plancat.c
+++ b/src/backend/optimizer/util/plancat.c
@@ -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;
diff --git a/src/backend/parser/parse_clause.c b/src/backend/parser/parse_clause.c
index 260ccd4..fe41918 100644
--- a/src/backend/parser/parse_clause.c
+++ b/src/backend/parser/parse_clause.c
@@ -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)
diff --git a/src/backend/parser/parse_expr.c b/src/backend/parser/parse_expr.c
index 76f3dd7..eb91da2 100644
--- a/src/backend/parser/parse_expr.c
+++ b/src/backend/parser/parse_expr.c
@@ -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;
diff --git a/src/backend/parser/parse_node.c b/src/backend/parser/parse_node.c
index 1baf7ef..bc832e7 100644
--- a/src/backend/parser/parse_node.c
+++ b/src/backend/parser/parse_node.c
@@ -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);
 
 
diff --git a/src/backend/parser/parse_relation.c b/src/backend/parser/parse_relation.c
index 4dd8150..47188fc 100644
--- a/src/backend/parser/parse_relation.c
+++ b/src/backend/parser/parse_relation.c
@@ -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,
diff --git a/src/backend/parser/parse_target.c b/src/backend/parser/parse_target.c
index 2901025..30d419e 100644
--- a/src/backend/parser/parse_target.c
+++ b/src/backend/parser/parse_target.c
@@ -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,
diff --git a/src/backend/parser/parse_type.c b/src/backend/parser/parse_type.c
index 7932a96..78fef26 100644
--- a/src/backend/parser/parse_type.c
+++ b/src/backend/parser/parse_type.c
@@ -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);
 
diff --git a/src/backend/parser/scansup.c b/src/backend/parser/scansup.c
index 53e3ae2..7745e8d 100644
--- a/src/backend/parser/scansup.c
+++ b/src/backend/parser/scansup.c
@@ -17,9 +17,8 @@
 
 #include <ctype.h>
 
-#include "parser/scansup.h"
 #include "mb/pg_wchar.h"
-
+#include "parser/scansup.h"
 
 /* ----------------
  *		scanstr
diff --git a/src/backend/partitioning/partbounds.c b/src/backend/partitioning/partbounds.c
index 318d8ec..2004e00 100644
--- a/src/backend/partitioning/partbounds.c
+++ b/src/backend/partitioning/partbounds.c
@@ -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"
 
 /*
diff --git a/src/backend/partitioning/partdesc.c b/src/backend/partitioning/partdesc.c
index b207b76..6ede084 100644
--- a/src/backend/partitioning/partdesc.c
+++ b/src/backend/partitioning/partdesc.c
@@ -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"
 #include "utils/syscache.h"
 
 typedef struct PartitionDirectoryData
diff --git a/src/backend/postmaster/bgworker.c b/src/backend/postmaster/bgworker.c
index b66b517..5f8a007 100644
--- a/src/backend/postmaster/bgworker.c
+++ b/src/backend/postmaster/bgworker.c
@@ -14,8 +14,8 @@
 
 #include <unistd.h>
 
-#include "libpq/pqsignal.h"
 #include "access/parallel.h"
+#include "libpq/pqsignal.h"
 #include "miscadmin.h"
 #include "pgstat.h"
 #include "port/atomics.h"
diff --git a/src/backend/postmaster/bgwriter.c b/src/backend/postmaster/bgwriter.c
index 8ec16a3..847d96c 100644
--- a/src/backend/postmaster/bgwriter.c
+++ b/src/backend/postmaster/bgwriter.c
@@ -38,8 +38,8 @@
 #include <sys/time.h>
 #include <unistd.h>
 
-#include "access/xlog.h"
 #include "access/xlog_internal.h"
+#include "access/xlog.h"
 #include "libpq/pqsignal.h"
 #include "miscadmin.h"
 #include "pgstat.h"
@@ -60,7 +60,6 @@
 #include "utils/resowner.h"
 #include "utils/timestamp.h"
 
-
 /*
  * GUC parameters
  */
diff --git a/src/backend/postmaster/pgstat.c b/src/backend/postmaster/pgstat.c
index 011076c..fabcf31 100644
--- a/src/backend/postmaster/pgstat.c
+++ b/src/backend/postmaster/pgstat.c
@@ -32,8 +32,6 @@
 #include <sys/select.h>
 #endif
 
-#include "pgstat.h"
-
 #include "access/heapam.h"
 #include "access/htup_details.h"
 #include "access/tableam.h"
@@ -48,6 +46,7 @@
 #include "mb/pg_wchar.h"
 #include "miscadmin.h"
 #include "pg_trace.h"
+#include "pgstat.h"
 #include "postmaster/autovacuum.h"
 #include "postmaster/fork_process.h"
 #include "postmaster/postmaster.h"
@@ -69,7 +68,6 @@
 #include "utils/snapmgr.h"
 #include "utils/timestamp.h"
 
-
 /* ----------
  * Timer definitions.
  * ----------
diff --git a/src/backend/replication/basebackup.c b/src/backend/replication/basebackup.c
index d0f210d..1fa4551 100644
--- a/src/backend/replication/basebackup.c
+++ b/src/backend/replication/basebackup.c
@@ -24,8 +24,8 @@
 #include "libpq/pqformat.h"
 #include "miscadmin.h"
 #include "nodes/pg_list.h"
-#include "pgtar.h"
 #include "pgstat.h"
+#include "pgtar.h"
 #include "port.h"
 #include "postmaster/syslogger.h"
 #include "replication/basebackup.h"
@@ -42,7 +42,6 @@
 #include "utils/relcache.h"
 #include "utils/timestamp.h"
 
-
 typedef struct
 {
 	const char *label;
diff --git a/src/backend/replication/libpqwalreceiver/libpqwalreceiver.c b/src/backend/replication/libpqwalreceiver/libpqwalreceiver.c
index 6eba08a..545d2fc 100644
--- a/src/backend/replication/libpqwalreceiver/libpqwalreceiver.c
+++ b/src/backend/replication/libpqwalreceiver/libpqwalreceiver.c
@@ -19,14 +19,14 @@
 #include <unistd.h>
 #include <sys/time.h>
 
-#include "libpq-fe.h"
-#include "pqexpbuffer.h"
 #include "access/xlog.h"
 #include "catalog/pg_type.h"
 #include "funcapi.h"
+#include "libpq-fe.h"
 #include "mb/pg_wchar.h"
 #include "miscadmin.h"
 #include "pgstat.h"
+#include "pqexpbuffer.h"
 #include "replication/walreceiver.h"
 #include "utils/builtins.h"
 #include "utils/memutils.h"
diff --git a/src/backend/replication/logical/decode.c b/src/backend/replication/logical/decode.c
index c53e7e2..bc532d0 100644
--- a/src/backend/replication/logical/decode.c
+++ b/src/backend/replication/logical/decode.c
@@ -31,19 +31,16 @@
 #include "access/transam.h"
 #include "access/xact.h"
 #include "access/xlog_internal.h"
-#include "access/xlogutils.h"
 #include "access/xlogreader.h"
 #include "access/xlogrecord.h"
-
+#include "access/xlogutils.h"
 #include "catalog/pg_control.h"
-
 #include "replication/decode.h"
 #include "replication/logical.h"
 #include "replication/message.h"
-#include "replication/reorderbuffer.h"
 #include "replication/origin.h"
+#include "replication/reorderbuffer.h"
 #include "replication/snapbuild.h"
-
 #include "storage/standby.h"
 
 typedef struct XLogRecordBuffer
diff --git a/src/backend/replication/logical/launcher.c b/src/backend/replication/logical/launcher.c
index 186057b..1f8821c 100644
--- a/src/backend/replication/logical/launcher.c
+++ b/src/backend/replication/logical/launcher.c
@@ -17,43 +17,35 @@
 
 #include "postgres.h"
 
-#include "funcapi.h"
-#include "miscadmin.h"
-#include "pgstat.h"
-
 #include "access/heapam.h"
 #include "access/htup.h"
 #include "access/htup_details.h"
 #include "access/tableam.h"
 #include "access/xact.h"
-
 #include "catalog/pg_subscription.h"
 #include "catalog/pg_subscription_rel.h"
-
+#include "funcapi.h"
 #include "libpq/pqsignal.h"
-
+#include "miscadmin.h"
+#include "pgstat.h"
 #include "postmaster/bgworker.h"
 #include "postmaster/fork_process.h"
 #include "postmaster/postmaster.h"
-
 #include "replication/logicallauncher.h"
 #include "replication/logicalworker.h"
 #include "replication/slot.h"
 #include "replication/walreceiver.h"
 #include "replication/worker_internal.h"
-
 #include "storage/ipc.h"
 #include "storage/proc.h"
 #include "storage/procarray.h"
 #include "storage/procsignal.h"
-
 #include "tcop/tcopprot.h"
-
 #include "utils/memutils.h"
 #include "utils/pg_lsn.h"
 #include "utils/ps_status.h"
-#include "utils/timeout.h"
 #include "utils/snapmgr.h"
+#include "utils/timeout.h"
 
 /* max sleep time between cycles (3min) */
 #define DEFAULT_NAPTIME_PER_CYCLE 180000L
diff --git a/src/backend/replication/logical/logical.c b/src/backend/replication/logical/logical.c
index da265f5..7e06615 100644
--- a/src/backend/replication/logical/logical.c
+++ b/src/backend/replication/logical/logical.c
@@ -28,21 +28,17 @@
 
 #include "postgres.h"
 
-#include "fmgr.h"
-#include "miscadmin.h"
-
 #include "access/xact.h"
 #include "access/xlog_internal.h"
-
+#include "fmgr.h"
+#include "miscadmin.h"
 #include "replication/decode.h"
 #include "replication/logical.h"
-#include "replication/reorderbuffer.h"
 #include "replication/origin.h"
+#include "replication/reorderbuffer.h"
 #include "replication/snapbuild.h"
-
 #include "storage/proc.h"
 #include "storage/procarray.h"
-
 #include "utils/memutils.h"
 
 /* data for errcontext callback */
diff --git a/src/backend/replication/logical/logicalfuncs.c b/src/backend/replication/logical/logicalfuncs.c
index d1cf80d..aa2106b 100644
--- a/src/backend/replication/logical/logicalfuncs.c
+++ b/src/backend/replication/logical/logicalfuncs.c
@@ -17,36 +17,28 @@
 
 #include <unistd.h>
 
-#include "fmgr.h"
-#include "funcapi.h"
-#include "miscadmin.h"
-
+#include "access/xact.h"
 #include "access/xlog_internal.h"
 #include "access/xlogutils.h"
-
-#include "access/xact.h"
-
 #include "catalog/pg_type.h"
-
-#include "nodes/makefuncs.h"
-
+#include "fmgr.h"
+#include "funcapi.h"
 #include "mb/pg_wchar.h"
-
+#include "miscadmin.h"
+#include "nodes/makefuncs.h"
+#include "replication/decode.h"
+#include "replication/logical.h"
+#include "replication/logicalfuncs.h"
+#include "replication/message.h"
+#include "storage/fd.h"
 #include "utils/array.h"
 #include "utils/builtins.h"
 #include "utils/inval.h"
+#include "utils/lsyscache.h"
 #include "utils/memutils.h"
 #include "utils/pg_lsn.h"
 #include "utils/regproc.h"
 #include "utils/resowner.h"
-#include "utils/lsyscache.h"
-
-#include "replication/decode.h"
-#include "replication/logical.h"
-#include "replication/logicalfuncs.h"
-#include "replication/message.h"
-
-#include "storage/fd.h"
 
 /* private date for writing out data */
 typedef struct DecodingOutputState
diff --git a/src/backend/replication/logical/message.c b/src/backend/replication/logical/message.c
index 0681cb4..1652546 100644
--- a/src/backend/replication/logical/message.c
+++ b/src/backend/replication/logical/message.c
@@ -31,17 +31,12 @@
 
 #include "postgres.h"
 
-#include "miscadmin.h"
-
 #include "access/xact.h"
-
 #include "catalog/indexing.h"
-
+#include "miscadmin.h"
 #include "nodes/execnodes.h"
-
-#include "replication/message.h"
 #include "replication/logical.h"
-
+#include "replication/message.h"
 #include "utils/memutils.h"
 
 /*
diff --git a/src/backend/replication/logical/origin.c b/src/backend/replication/logical/origin.c
index 07ae613..a590f9c 100644
--- a/src/backend/replication/logical/origin.c
+++ b/src/backend/replication/logical/origin.c
@@ -70,33 +70,29 @@
 #include <unistd.h>
 #include <sys/stat.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 "funcapi.h"
+#include "miscadmin.h"
 #include "nodes/execnodes.h"
-
-#include "replication/origin.h"
-#include "replication/logical.h"
 #include "pgstat.h"
+#include "replication/logical.h"
+#include "replication/origin.h"
+#include "storage/condition_variable.h"
+#include "storage/copydir.h"
 #include "storage/fd.h"
 #include "storage/ipc.h"
 #include "storage/lmgr.h"
-#include "storage/condition_variable.h"
-#include "storage/copydir.h"
-
 #include "utils/builtins.h"
 #include "utils/fmgroids.h"
 #include "utils/pg_lsn.h"
 #include "utils/rel.h"
-#include "utils/syscache.h"
 #include "utils/snapmgr.h"
+#include "utils/syscache.h"
 
 /*
  * Replay progress of a single remote node.
diff --git a/src/backend/replication/logical/snapbuild.c b/src/backend/replication/logical/snapbuild.c
index 0bd1d0f..5112eca 100644
--- a/src/backend/replication/logical/snapbuild.c
+++ b/src/backend/replication/logical/snapbuild.c
@@ -120,29 +120,24 @@
 #include <sys/stat.h>
 #include <unistd.h>
 
-#include "miscadmin.h"
-
 #include "access/heapam_xlog.h"
 #include "access/transam.h"
 #include "access/xact.h"
-
+#include "miscadmin.h"
 #include "pgstat.h"
-
 #include "replication/logical.h"
 #include "replication/reorderbuffer.h"
 #include "replication/snapbuild.h"
-
-#include "utils/builtins.h"
-#include "utils/memutils.h"
-#include "utils/snapshot.h"
-#include "utils/snapmgr.h"
-
 #include "storage/block.h"		/* debugging output */
 #include "storage/fd.h"
 #include "storage/lmgr.h"
 #include "storage/proc.h"
 #include "storage/procarray.h"
 #include "storage/standby.h"
+#include "utils/builtins.h"
+#include "utils/memutils.h"
+#include "utils/snapmgr.h"
+#include "utils/snapshot.h"
 
 /*
  * This struct contains the current state of the snapshot building
diff --git a/src/backend/replication/logical/tablesync.c b/src/backend/replication/logical/tablesync.c
index 7881079..e01d18c 100644
--- a/src/backend/replication/logical/tablesync.c
+++ b/src/backend/replication/logical/tablesync.c
@@ -85,30 +85,23 @@
 
 #include "postgres.h"
 
-#include "miscadmin.h"
-#include "pgstat.h"
-
 #include "access/table.h"
 #include "access/xact.h"
-
 #include "catalog/pg_subscription_rel.h"
 #include "catalog/pg_type.h"
-
 #include "commands/copy.h"
-
+#include "miscadmin.h"
 #include "parser/parse_relation.h"
-
+#include "pgstat.h"
 #include "replication/logicallauncher.h"
 #include "replication/logicalrelation.h"
 #include "replication/walreceiver.h"
 #include "replication/worker_internal.h"
-
-#include "utils/snapmgr.h"
 #include "storage/ipc.h"
-
 #include "utils/builtins.h"
 #include "utils/lsyscache.h"
 #include "utils/memutils.h"
+#include "utils/snapmgr.h"
 
 static bool table_states_valid = false;
 
diff --git a/src/backend/replication/pgoutput/pgoutput.c b/src/backend/replication/pgoutput/pgoutput.c
index 9c08757..3483c1b 100644
--- a/src/backend/replication/pgoutput/pgoutput.c
+++ b/src/backend/replication/pgoutput/pgoutput.c
@@ -13,16 +13,13 @@
 #include "postgres.h"
 
 #include "catalog/pg_publication.h"
-
 #include "fmgr.h"
-
 #include "replication/logical.h"
 #include "replication/logicalproto.h"
 #include "replication/origin.h"
 #include "replication/pgoutput.h"
-
-#include "utils/inval.h"
 #include "utils/int8.h"
+#include "utils/inval.h"
 #include "utils/memutils.h"
 #include "utils/syscache.h"
 #include "utils/varlena.h"
diff --git a/src/backend/replication/slotfuncs.c b/src/backend/replication/slotfuncs.c
index 42da631..46e6dd4 100644
--- a/src/backend/replication/slotfuncs.c
+++ b/src/backend/replication/slotfuncs.c
@@ -17,9 +17,9 @@
 #include "funcapi.h"
 #include "miscadmin.h"
 #include "replication/decode.h"
-#include "replication/slot.h"
 #include "replication/logical.h"
 #include "replication/logicalfuncs.h"
+#include "replication/slot.h"
 #include "utils/builtins.h"
 #include "utils/inval.h"
 #include "utils/pg_lsn.h"
diff --git a/src/backend/rewrite/rowsecurity.c b/src/backend/rewrite/rowsecurity.c
index 1c44714..df7bde3 100644
--- a/src/backend/rewrite/rowsecurity.c
+++ b/src/backend/rewrite/rowsecurity.c
@@ -51,12 +51,12 @@
 #include "rewrite/rewriteHandler.h"
 #include "rewrite/rewriteManip.h"
 #include "rewrite/rowsecurity.h"
+#include "tcop/utility.h"
 #include "utils/acl.h"
 #include "utils/lsyscache.h"
 #include "utils/rel.h"
 #include "utils/rls.h"
 #include "utils/syscache.h"
-#include "tcop/utility.h"
 
 static void get_policies_for_relation(Relation relation,
 									  CmdType cmd, Oid user_id,
diff --git a/src/backend/statistics/dependencies.c b/src/backend/statistics/dependencies.c
index 585cad2..9493b2d 100644
--- a/src/backend/statistics/dependencies.c
+++ b/src/backend/statistics/dependencies.c
@@ -20,10 +20,10 @@
 #include "catalog/pg_statistic_ext_data.h"
 #include "lib/stringinfo.h"
 #include "nodes/nodeFuncs.h"
-#include "optimizer/clauses.h"
-#include "optimizer/optimizer.h"
 #include "nodes/nodes.h"
 #include "nodes/pathnodes.h"
+#include "optimizer/clauses.h"
+#include "optimizer/optimizer.h"
 #include "statistics/extended_stats_internal.h"
 #include "statistics/statistics.h"
 #include "utils/bytea.h"
diff --git a/src/backend/statistics/mvdistinct.c b/src/backend/statistics/mvdistinct.c
index f3383c0..4ccfc5f 100644
--- a/src/backend/statistics/mvdistinct.c
+++ b/src/backend/statistics/mvdistinct.c
@@ -28,14 +28,13 @@
 #include "access/htup_details.h"
 #include "catalog/pg_statistic_ext.h"
 #include "catalog/pg_statistic_ext_data.h"
+#include "lib/stringinfo.h"
+#include "statistics/extended_stats_internal.h"
+#include "statistics/statistics.h"
 #include "utils/fmgrprotos.h"
 #include "utils/lsyscache.h"
-#include "lib/stringinfo.h"
 #include "utils/syscache.h"
 #include "utils/typcache.h"
-#include "statistics/extended_stats_internal.h"
-#include "statistics/statistics.h"
-
 
 static double ndistinct_for_combination(double totalrows, int numrows,
 										HeapTuple *rows, VacAttrStats **stats,
diff --git a/src/backend/storage/buffer/buf_init.c b/src/backend/storage/buffer/buf_init.c
index ccd2c31..1eb08cd 100644
--- a/src/backend/storage/buffer/buf_init.c
+++ b/src/backend/storage/buffer/buf_init.c
@@ -14,9 +14,8 @@
  */
 #include "postgres.h"
 
-#include "storage/bufmgr.h"
 #include "storage/buf_internals.h"
-
+#include "storage/bufmgr.h"
 
 BufferDescPadded *BufferDescriptors;
 char	   *BufferBlocks;
diff --git a/src/backend/storage/buffer/buf_table.c b/src/backend/storage/buffer/buf_table.c
index e546585..7e44b51 100644
--- a/src/backend/storage/buffer/buf_table.c
+++ b/src/backend/storage/buffer/buf_table.c
@@ -21,9 +21,8 @@
  */
 #include "postgres.h"
 
-#include "storage/bufmgr.h"
 #include "storage/buf_internals.h"
-
+#include "storage/bufmgr.h"
 
 /* entry for buffer lookup hashtable */
 typedef struct
diff --git a/src/backend/storage/file/buffile.c b/src/backend/storage/file/buffile.c
index b40e6f3..440ff77 100644
--- a/src/backend/storage/file/buffile.c
+++ b/src/backend/storage/file/buffile.c
@@ -45,9 +45,9 @@
 #include "executor/instrument.h"
 #include "miscadmin.h"
 #include "pgstat.h"
-#include "storage/fd.h"
-#include "storage/buffile.h"
 #include "storage/buf_internals.h"
+#include "storage/buffile.h"
+#include "storage/fd.h"
 #include "utils/resowner.h"
 
 /*
diff --git a/src/backend/storage/file/copydir.c b/src/backend/storage/file/copydir.c
index ca1c9cd..c94ce5b 100644
--- a/src/backend/storage/file/copydir.c
+++ b/src/backend/storage/file/copydir.c
@@ -22,10 +22,10 @@
 #include <unistd.h>
 #include <sys/stat.h>
 
-#include "storage/copydir.h"
-#include "storage/fd.h"
 #include "miscadmin.h"
 #include "pgstat.h"
+#include "storage/copydir.h"
+#include "storage/fd.h"
 
 /*
  * copydir: copy a directory
diff --git a/src/backend/storage/file/fd.c b/src/backend/storage/file/fd.c
index fe2bb8f..f18bcb2 100644
--- a/src/backend/storage/file/fd.c
+++ b/src/backend/storage/file/fd.c
@@ -79,11 +79,11 @@
 #include <sys/resource.h>		/* for getrlimit */
 #endif
 
-#include "miscadmin.h"
 #include "access/xact.h"
 #include "access/xlog.h"
 #include "catalog/pg_tablespace.h"
 #include "common/file_perm.h"
+#include "miscadmin.h"
 #include "pgstat.h"
 #include "portability/mem.h"
 #include "storage/fd.h"
@@ -91,7 +91,6 @@
 #include "utils/guc.h"
 #include "utils/resowner_private.h"
 
-
 /* Define PG_FLUSH_DATA_WORKS if we have an implementation for pg_flush_data */
 #if defined(HAVE_SYNC_FILE_RANGE)
 #define PG_FLUSH_DATA_WORKS 1
diff --git a/src/backend/storage/ipc/dsm_impl.c b/src/backend/storage/ipc/dsm_impl.c
index 2879b84..d550093 100644
--- a/src/backend/storage/ipc/dsm_impl.c
+++ b/src/backend/storage/ipc/dsm_impl.c
@@ -47,7 +47,6 @@
  */
 
 #include "postgres.h"
-#include "miscadmin.h"
 
 #include <fcntl.h>
 #include <unistd.h>
@@ -61,15 +60,16 @@
 #ifdef HAVE_SYS_SHM_H
 #include <sys/shm.h>
 #endif
+
 #include "common/file_perm.h"
+#include "miscadmin.h"
 #include "pgstat.h"
-
 #include "portability/mem.h"
+#include "postmaster/postmaster.h"
 #include "storage/dsm_impl.h"
 #include "storage/fd.h"
 #include "utils/guc.h"
 #include "utils/memutils.h"
-#include "postmaster/postmaster.h"
 
 #ifdef USE_DSM_POSIX
 static bool dsm_impl_posix(dsm_op op, dsm_handle handle, Size request_size,
diff --git a/src/backend/storage/ipc/ipci.c b/src/backend/storage/ipc/ipci.c
index 8853706..4829953 100644
--- a/src/backend/storage/ipc/ipci.c
+++ b/src/backend/storage/ipc/ipci.c
@@ -29,10 +29,10 @@
 #include "postmaster/bgwriter.h"
 #include "postmaster/postmaster.h"
 #include "replication/logicallauncher.h"
+#include "replication/origin.h"
 #include "replication/slot.h"
 #include "replication/walreceiver.h"
 #include "replication/walsender.h"
-#include "replication/origin.h"
 #include "storage/bufmgr.h"
 #include "storage/dsm.h"
 #include "storage/ipc.h"
diff --git a/src/backend/storage/ipc/procsignal.c b/src/backend/storage/ipc/procsignal.c
index 7605b2c..fde97a1 100644
--- a/src/backend/storage/ipc/procsignal.c
+++ b/src/backend/storage/ipc/procsignal.c
@@ -21,14 +21,13 @@
 #include "commands/async.h"
 #include "miscadmin.h"
 #include "replication/walsender.h"
-#include "storage/latch.h"
 #include "storage/ipc.h"
+#include "storage/latch.h"
 #include "storage/proc.h"
 #include "storage/shmem.h"
 #include "storage/sinval.h"
 #include "tcop/tcopprot.h"
 
-
 /*
  * The SIGUSR1 signal is multiplexed to support signalling multiple event
  * types. The specific reason is communicated via flags in shared memory.
diff --git a/src/backend/storage/ipc/sinvaladt.c b/src/backend/storage/ipc/sinvaladt.c
index db080c8..0c58b39 100644
--- a/src/backend/storage/ipc/sinvaladt.c
+++ b/src/backend/storage/ipc/sinvaladt.c
@@ -17,6 +17,7 @@
 #include <signal.h>
 #include <unistd.h>
 
+#include "access/transam.h"
 #include "miscadmin.h"
 #include "storage/backendid.h"
 #include "storage/ipc.h"
@@ -25,8 +26,6 @@
 #include "storage/shmem.h"
 #include "storage/sinvaladt.h"
 #include "storage/spin.h"
-#include "access/transam.h"
-
 
 /*
  * Conceptually, the shared cache invalidation messages are stored in an
diff --git a/src/backend/storage/lmgr/lwlock.c b/src/backend/storage/lmgr/lwlock.c
index fb0bf44..18e3843 100644
--- a/src/backend/storage/lmgr/lwlock.c
+++ b/src/backend/storage/lmgr/lwlock.c
@@ -77,8 +77,8 @@
 #include "postgres.h"
 
 #include "miscadmin.h"
-#include "pgstat.h"
 #include "pg_trace.h"
+#include "pgstat.h"
 #include "postmaster/postmaster.h"
 #include "replication/slot.h"
 #include "storage/ipc.h"
diff --git a/src/backend/storage/lmgr/proc.c b/src/backend/storage/lmgr/proc.c
index 498373f..7263c85 100644
--- a/src/backend/storage/lmgr/proc.c
+++ b/src/backend/storage/lmgr/proc.c
@@ -45,7 +45,6 @@
 #include "replication/syncrep.h"
 #include "replication/walsender.h"
 #include "storage/condition_variable.h"
-#include "storage/standby.h"
 #include "storage/ipc.h"
 #include "storage/lmgr.h"
 #include "storage/pmsignal.h"
@@ -53,10 +52,10 @@
 #include "storage/procarray.h"
 #include "storage/procsignal.h"
 #include "storage/spin.h"
+#include "storage/standby.h"
 #include "utils/timeout.h"
 #include "utils/timestamp.h"
 
-
 /* GUC variables */
 int			DeadlockTimeout = 1000;
 int			StatementTimeout = 0;
diff --git a/src/backend/storage/lmgr/s_lock.c b/src/backend/storage/lmgr/s_lock.c
index 2e6c55b..04befb7 100644
--- a/src/backend/storage/lmgr/s_lock.c
+++ b/src/backend/storage/lmgr/s_lock.c
@@ -50,9 +50,8 @@
 #include <time.h>
 #include <unistd.h>
 
-#include "storage/s_lock.h"
 #include "port/atomics.h"
-
+#include "storage/s_lock.h"
 
 #define MIN_SPINS_PER_DELAY 10
 #define MAX_SPINS_PER_DELAY 1000
diff --git a/src/backend/storage/page/checksum.c b/src/backend/storage/page/checksum.c
index 1eb7ef6..8f7a110 100644
--- a/src/backend/storage/page/checksum.c
+++ b/src/backend/storage/page/checksum.c
@@ -14,7 +14,6 @@
 #include "postgres.h"
 
 #include "storage/checksum.h"
-
 /*
  * The actual code is in storage/checksum_impl.h.  This is done so that
  * external programs can incorporate the checksum code by #include'ing
diff --git a/src/backend/storage/smgr/md.c b/src/backend/storage/smgr/md.c
index 07f3c93..8a9eaf6 100644
--- a/src/backend/storage/smgr/md.c
+++ b/src/backend/storage/smgr/md.c
@@ -25,21 +25,21 @@
 #include <fcntl.h>
 #include <sys/file.h>
 
-#include "miscadmin.h"
-#include "access/xlogutils.h"
 #include "access/xlog.h"
+#include "access/xlogutils.h"
 #include "commands/tablespace.h"
+#include "miscadmin.h"
+#include "pg_trace.h"
 #include "pgstat.h"
 #include "postmaster/bgwriter.h"
-#include "storage/fd.h"
 #include "storage/bufmgr.h"
+#include "storage/fd.h"
 #include "storage/md.h"
 #include "storage/relfilenode.h"
 #include "storage/smgr.h"
 #include "storage/sync.h"
 #include "utils/hsearch.h"
 #include "utils/memutils.h"
-#include "pg_trace.h"
 
 /*
  *	The magnetic disk storage manager keeps track of open file
diff --git a/src/backend/storage/sync/sync.c b/src/backend/storage/sync/sync.c
index f329c3f..3485e6f 100644
--- a/src/backend/storage/sync/sync.c
+++ b/src/backend/storage/sync/sync.c
@@ -18,19 +18,19 @@
 #include <fcntl.h>
 #include <sys/file.h>
 
-#include "miscadmin.h"
-#include "pgstat.h"
-#include "access/xlogutils.h"
 #include "access/xlog.h"
+#include "access/xlogutils.h"
 #include "commands/tablespace.h"
+#include "miscadmin.h"
+#include "pgstat.h"
 #include "portability/instr_time.h"
 #include "postmaster/bgwriter.h"
 #include "storage/bufmgr.h"
 #include "storage/ipc.h"
 #include "storage/md.h"
 #include "utils/hsearch.h"
-#include "utils/memutils.h"
 #include "utils/inval.h"
+#include "utils/memutils.h"
 
 static MemoryContext pendingOpsCxt; /* context for the pending ops state  */
 
diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c
index e8d8e6f..5ddd18d 100644
--- a/src/backend/tcop/postgres.c
+++ b/src/backend/tcop/postgres.c
@@ -47,14 +47,15 @@
 #include "libpq/libpq.h"
 #include "libpq/pqformat.h"
 #include "libpq/pqsignal.h"
+#include "mb/pg_wchar.h"
 #include "miscadmin.h"
 #include "nodes/print.h"
 #include "optimizer/optimizer.h"
-#include "pgstat.h"
-#include "pg_trace.h"
 #include "parser/analyze.h"
 #include "parser/parser.h"
 #include "pg_getopt.h"
+#include "pg_trace.h"
+#include "pgstat.h"
 #include "postmaster/autovacuum.h"
 #include "postmaster/postmaster.h"
 #include "replication/logicallauncher.h"
@@ -77,8 +78,6 @@
 #include "utils/snapmgr.h"
 #include "utils/timeout.h"
 #include "utils/timestamp.h"
-#include "mb/pg_wchar.h"
-
 
 /* ----------------
  *		global variables
diff --git a/src/backend/tcop/utility.c b/src/backend/tcop/utility.c
index c6faa66..98f1ae8 100644
--- a/src/backend/tcop/utility.c
+++ b/src/backend/tcop/utility.c
@@ -28,8 +28,8 @@
 #include "commands/alter.h"
 #include "commands/async.h"
 #include "commands/cluster.h"
-#include "commands/comment.h"
 #include "commands/collationcmds.h"
+#include "commands/comment.h"
 #include "commands/conversioncmds.h"
 #include "commands/copy.h"
 #include "commands/createas.h"
@@ -39,8 +39,8 @@
 #include "commands/event_trigger.h"
 #include "commands/explain.h"
 #include "commands/extension.h"
-#include "commands/matview.h"
 #include "commands/lockcmds.h"
+#include "commands/matview.h"
 #include "commands/policy.h"
 #include "commands/portalcmds.h"
 #include "commands/prepare.h"
@@ -68,9 +68,8 @@
 #include "utils/acl.h"
 #include "utils/guc.h"
 #include "utils/lsyscache.h"
-#include "utils/syscache.h"
 #include "utils/rel.h"
-
+#include "utils/syscache.h"
 
 /* Hook for plugins to get control in ProcessUtility() */
 ProcessUtility_hook_type ProcessUtility_hook = NULL;
diff --git a/src/backend/tsearch/wparser.c b/src/backend/tsearch/wparser.c
index a3372a8..083292c 100644
--- a/src/backend/tsearch/wparser.c
+++ b/src/backend/tsearch/wparser.c
@@ -13,17 +13,16 @@
  */
 #include "postgres.h"
 
-#include "funcapi.h"
 #include "catalog/namespace.h"
 #include "catalog/pg_type.h"
 #include "commands/defrem.h"
+#include "funcapi.h"
 #include "tsearch/ts_cache.h"
 #include "tsearch/ts_utils.h"
 #include "utils/builtins.h"
 #include "utils/jsonapi.h"
 #include "utils/varlena.h"
 
-
 /******sql-level interface******/
 
 typedef struct
diff --git a/src/backend/utils/adt/acl.c b/src/backend/utils/adt/acl.c
index d7e6100..0070a7e 100644
--- a/src/backend/utils/adt/acl.c
+++ b/src/backend/utils/adt/acl.c
@@ -19,10 +19,10 @@
 #include "access/htup_details.h"
 #include "catalog/catalog.h"
 #include "catalog/namespace.h"
-#include "catalog/pg_authid.h"
 #include "catalog/pg_auth_members.h"
-#include "catalog/pg_type.h"
+#include "catalog/pg_authid.h"
 #include "catalog/pg_class.h"
+#include "catalog/pg_type.h"
 #include "commands/dbcommands.h"
 #include "commands/proclang.h"
 #include "commands/tablespace.h"
@@ -40,7 +40,6 @@
 #include "utils/syscache.h"
 #include "utils/varlena.h"
 
-
 typedef struct
 {
 	const char *name;
diff --git a/src/backend/utils/adt/datetime.c b/src/backend/utils/adt/datetime.c
index e38bd93..c911d72 100644
--- a/src/backend/utils/adt/datetime.c
+++ b/src/backend/utils/adt/datetime.c
@@ -31,7 +31,6 @@
 #include "utils/memutils.h"
 #include "utils/tzparser.h"
 
-
 static int	DecodeNumber(int flen, char *field, bool haveTextMonth,
 						 int fmask, int *tmask,
 						 struct pg_tm *tm, fsec_t *fsec, bool *is2digits);
diff --git a/src/backend/utils/adt/format_type.c b/src/backend/utils/adt/format_type.c
index 6ae2a31..b6befd6 100644
--- a/src/backend/utils/adt/format_type.c
+++ b/src/backend/utils/adt/format_type.c
@@ -20,11 +20,11 @@
 #include "access/htup_details.h"
 #include "catalog/namespace.h"
 #include "catalog/pg_type.h"
+#include "mb/pg_wchar.h"
 #include "utils/builtins.h"
 #include "utils/lsyscache.h"
 #include "utils/numeric.h"
 #include "utils/syscache.h"
-#include "mb/pg_wchar.h"
 
 static char *printTypmod(const char *typname, int32 typmod, Oid typmodout);
 
diff --git a/src/backend/utils/adt/int8.c b/src/backend/utils/adt/int8.c
index 0ff9394..5a558fb 100644
--- a/src/backend/utils/adt/int8.c
+++ b/src/backend/utils/adt/int8.c
@@ -23,9 +23,8 @@
 #include "nodes/nodeFuncs.h"
 #include "nodes/supportnodes.h"
 #include "optimizer/optimizer.h"
-#include "utils/int8.h"
 #include "utils/builtins.h"
-
+#include "utils/int8.h"
 
 #define MAXINT8LEN		25
 
diff --git a/src/backend/utils/adt/json.c b/src/backend/utils/adt/json.c
index d4ba3bd..e2e16eb 100644
--- a/src/backend/utils/adt/json.c
+++ b/src/backend/utils/adt/json.c
@@ -27,11 +27,11 @@
 #include "utils/builtins.h"
 #include "utils/date.h"
 #include "utils/datetime.h"
-#include "utils/lsyscache.h"
 #include "utils/json.h"
 #include "utils/jsonapi.h"
-#include "utils/typcache.h"
+#include "utils/lsyscache.h"
 #include "utils/syscache.h"
+#include "utils/typcache.h"
 
 /*
  * The context of the parser is maintained by the recursive descent
diff --git a/src/backend/utils/adt/jsonb.c b/src/backend/utils/adt/jsonb.c
index 74b4bbe..9927d08 100644
--- a/src/backend/utils/adt/jsonb.c
+++ b/src/backend/utils/adt/jsonb.c
@@ -12,20 +12,20 @@
  */
 #include "postgres.h"
 
-#include "miscadmin.h"
 #include "access/htup_details.h"
 #include "access/transam.h"
 #include "catalog/pg_type.h"
 #include "funcapi.h"
 #include "libpq/pqformat.h"
+#include "miscadmin.h"
 #include "parser/parse_coerce.h"
 #include "utils/builtins.h"
 #include "utils/date.h"
 #include "utils/datetime.h"
-#include "utils/lsyscache.h"
 #include "utils/json.h"
 #include "utils/jsonapi.h"
 #include "utils/jsonb.h"
+#include "utils/lsyscache.h"
 #include "utils/syscache.h"
 #include "utils/typcache.h"
 
diff --git a/src/backend/utils/adt/jsonpath_exec.c b/src/backend/utils/adt/jsonpath_exec.c
index a35f718..906630e 100644
--- a/src/backend/utils/adt/jsonpath_exec.c
+++ b/src/backend/utils/adt/jsonpath_exec.c
@@ -66,18 +66,17 @@
 #include "miscadmin.h"
 #include "regex/regex.h"
 #include "utils/builtins.h"
+#include "utils/date.h"
 #include "utils/datetime.h"
 #include "utils/datum.h"
-#include "utils/formatting.h"
 #include "utils/float.h"
+#include "utils/formatting.h"
 #include "utils/guc.h"
 #include "utils/json.h"
 #include "utils/jsonpath.h"
-#include "utils/date.h"
 #include "utils/timestamp.h"
 #include "utils/varlena.h"
 
-
 /*
  * Represents "base object" and it's "id" for .keyvalue() evaluation.
  */
diff --git a/src/backend/utils/adt/misc.c b/src/backend/utils/adt/misc.c
index d330a88..27474a6 100644
--- a/src/backend/utils/adt/misc.c
+++ b/src/backend/utils/adt/misc.c
@@ -29,18 +29,17 @@
 #include "common/keywords.h"
 #include "funcapi.h"
 #include "miscadmin.h"
-#include "pgstat.h"
 #include "parser/scansup.h"
+#include "pgstat.h"
 #include "postmaster/syslogger.h"
 #include "rewrite/rewriteHandler.h"
 #include "storage/fd.h"
-#include "utils/lsyscache.h"
-#include "utils/ruleutils.h"
 #include "tcop/tcopprot.h"
 #include "utils/builtins.h"
+#include "utils/lsyscache.h"
+#include "utils/ruleutils.h"
 #include "utils/timestamp.h"
 
-
 /*
  * Common subroutine for num_nulls() and num_nonnulls().
  * Returns true if successful, false if function should return NULL.
diff --git a/src/backend/utils/adt/oracle_compat.c b/src/backend/utils/adt/oracle_compat.c
index 0fdfee5..9557732 100644
--- a/src/backend/utils/adt/oracle_compat.c
+++ b/src/backend/utils/adt/oracle_compat.c
@@ -16,10 +16,9 @@
 #include "postgres.h"
 
 #include "common/int.h"
+#include "mb/pg_wchar.h"
 #include "utils/builtins.h"
 #include "utils/formatting.h"
-#include "mb/pg_wchar.h"
-
 
 static text *dotrim(const char *string, int stringlen,
 					const char *set, int setlen,
diff --git a/src/backend/utils/adt/rangetypes_gist.c b/src/backend/utils/adt/rangetypes_gist.c
index 6f93ce6..c0edae6 100644
--- a/src/backend/utils/adt/rangetypes_gist.c
+++ b/src/backend/utils/adt/rangetypes_gist.c
@@ -16,12 +16,11 @@
 
 #include "access/gist.h"
 #include "access/stratnum.h"
+#include "utils/datum.h"
 #include "utils/float.h"
 #include "utils/fmgrprotos.h"
-#include "utils/datum.h"
 #include "utils/rangetypes.h"
 
-
 /*
  * Range class properties used to segregate different classes of ranges in
  * GiST.  Each unique combination of properties is a class.  CLS_EMPTY cannot
diff --git a/src/backend/utils/adt/regproc.c b/src/backend/utils/adt/regproc.c
index 17a7f6c..4b1decf 100644
--- a/src/backend/utils/adt/regproc.c
+++ b/src/backend/utils/adt/regproc.c
@@ -33,11 +33,11 @@
 #include "miscadmin.h"
 #include "parser/parse_type.h"
 #include "parser/scansup.h"
+#include "utils/acl.h"
 #include "utils/builtins.h"
 #include "utils/lsyscache.h"
-#include "utils/syscache.h"
-#include "utils/acl.h"
 #include "utils/regproc.h"
+#include "utils/syscache.h"
 #include "utils/varlena.h"
 
 static char *format_operator_internal(Oid operator_oid, bool force_qualify);
diff --git a/src/backend/utils/adt/ri_triggers.c b/src/backend/utils/adt/ri_triggers.c
index fb477d4..d4282a3 100644
--- a/src/backend/utils/adt/ri_triggers.c
+++ b/src/backend/utils/adt/ri_triggers.c
@@ -36,9 +36,9 @@
 #include "executor/executor.h"
 #include "executor/spi.h"
 #include "lib/ilist.h"
+#include "miscadmin.h"
 #include "parser/parse_coerce.h"
 #include "parser/parse_relation.h"
-#include "miscadmin.h"
 #include "storage/bufmgr.h"
 #include "utils/acl.h"
 #include "utils/builtins.h"
@@ -54,7 +54,6 @@
 #include "utils/snapmgr.h"
 #include "utils/syscache.h"
 
-
 /*
  * Local definitions
  */
diff --git a/src/backend/utils/adt/ruleutils.c b/src/backend/utils/adt/ruleutils.c
index 3e64390..c1de869 100644
--- a/src/backend/utils/adt/ruleutils.c
+++ b/src/backend/utils/adt/ruleutils.c
@@ -50,9 +50,9 @@
 #include "nodes/makefuncs.h"
 #include "nodes/nodeFuncs.h"
 #include "optimizer/optimizer.h"
-#include "parser/parse_node.h"
 #include "parser/parse_agg.h"
 #include "parser/parse_func.h"
+#include "parser/parse_node.h"
 #include "parser/parse_oper.h"
 #include "parser/parser.h"
 #include "parser/parsetree.h"
@@ -74,7 +74,6 @@
 #include "utils/varlena.h"
 #include "utils/xml.h"
 
-
 /* ----------
  * Pretty formatting constants
  * ----------
diff --git a/src/backend/utils/adt/tsquery.c b/src/backend/utils/adt/tsquery.c
index ab2b49f..4f574b3 100644
--- a/src/backend/utils/adt/tsquery.c
+++ b/src/backend/utils/adt/tsquery.c
@@ -16,8 +16,8 @@
 
 #include "libpq/pqformat.h"
 #include "miscadmin.h"
-#include "tsearch/ts_type.h"
 #include "tsearch/ts_locale.h"
+#include "tsearch/ts_type.h"
 #include "tsearch/ts_utils.h"
 #include "utils/builtins.h"
 #include "utils/memutils.h"
diff --git a/src/backend/utils/adt/tsquery_cleanup.c b/src/backend/utils/adt/tsquery_cleanup.c
index af07563..217de77 100644
--- a/src/backend/utils/adt/tsquery_cleanup.c
+++ b/src/backend/utils/adt/tsquery_cleanup.c
@@ -15,8 +15,8 @@
 
 #include "postgres.h"
 
-#include "tsearch/ts_utils.h"
 #include "miscadmin.h"
+#include "tsearch/ts_utils.h"
 
 typedef struct NODE
 {
diff --git a/src/backend/utils/adt/tsquery_gist.c b/src/backend/utils/adt/tsquery_gist.c
index 91200ee..282fb2d 100644
--- a/src/backend/utils/adt/tsquery_gist.c
+++ b/src/backend/utils/adt/tsquery_gist.c
@@ -14,8 +14,8 @@
 
 #include "postgres.h"
 
-#include "access/stratnum.h"
 #include "access/gist.h"
+#include "access/stratnum.h"
 #include "tsearch/ts_utils.h"
 #include "utils/builtins.h"
 
diff --git a/src/backend/utils/adt/tsquery_util.c b/src/backend/utils/adt/tsquery_util.c
index de46a00..7cb19db 100644
--- a/src/backend/utils/adt/tsquery_util.c
+++ b/src/backend/utils/adt/tsquery_util.c
@@ -14,8 +14,8 @@
 
 #include "postgres.h"
 
-#include "tsearch/ts_utils.h"
 #include "miscadmin.h"
+#include "tsearch/ts_utils.h"
 
 /*
  * Build QTNode tree for a tsquery given in QueryItem array format.
diff --git a/src/backend/utils/adt/tsrank.c b/src/backend/utils/adt/tsrank.c
index e28859d..2d8359d 100644
--- a/src/backend/utils/adt/tsrank.c
+++ b/src/backend/utils/adt/tsrank.c
@@ -16,11 +16,10 @@
 #include <limits.h>
 #include <math.h>
 
+#include "miscadmin.h"
 #include "tsearch/ts_utils.h"
 #include "utils/array.h"
 #include "utils/builtins.h"
-#include "miscadmin.h"
-
 
 static const float weights[] = {0.1f, 0.2f, 0.4f, 1.0f};
 
diff --git a/src/backend/utils/adt/txid.c b/src/backend/utils/adt/txid.c
index 90b2c9b..d346324 100644
--- a/src/backend/utils/adt/txid.c
+++ b/src/backend/utils/adt/txid.c
@@ -26,15 +26,14 @@
 #include "access/xact.h"
 #include "access/xlog.h"
 #include "funcapi.h"
-#include "miscadmin.h"
 #include "libpq/pqformat.h"
+#include "miscadmin.h"
 #include "postmaster/postmaster.h"
 #include "storage/lwlock.h"
 #include "utils/builtins.h"
 #include "utils/memutils.h"
 #include "utils/snapmgr.h"
 
-
 /* txid will be signed int8 in database, so must limit to 63 bits */
 #define MAX_TXID   ((uint64) PG_INT64_MAX)
 
diff --git a/src/backend/utils/adt/varchar.c b/src/backend/utils/adt/varchar.c
index e63a4e5..2aed411 100644
--- a/src/backend/utils/adt/varchar.c
+++ b/src/backend/utils/adt/varchar.c
@@ -18,6 +18,7 @@
 #include "catalog/pg_collation.h"
 #include "catalog/pg_type.h"
 #include "libpq/pqformat.h"
+#include "mb/pg_wchar.h"
 #include "nodes/nodeFuncs.h"
 #include "nodes/supportnodes.h"
 #include "utils/array.h"
@@ -26,8 +27,6 @@
 #include "utils/lsyscache.h"
 #include "utils/pg_locale.h"
 #include "utils/varlena.h"
-#include "mb/pg_wchar.h"
-
 
 /* common code for bpchartypmodin and varchartypmodin */
 static int32
diff --git a/src/backend/utils/cache/evtcache.c b/src/backend/utils/cache/evtcache.c
index 419bde5..1b0f738 100644
--- a/src/backend/utils/cache/evtcache.c
+++ b/src/backend/utils/cache/evtcache.c
@@ -16,17 +16,17 @@
 #include "access/genam.h"
 #include "access/htup_details.h"
 #include "access/relation.h"
-#include "catalog/pg_event_trigger.h"
 #include "catalog/indexing.h"
+#include "catalog/pg_event_trigger.h"
 #include "catalog/pg_type.h"
 #include "commands/trigger.h"
 #include "utils/array.h"
 #include "utils/builtins.h"
 #include "utils/catcache.h"
 #include "utils/evtcache.h"
+#include "utils/hsearch.h"
 #include "utils/inval.h"
 #include "utils/memutils.h"
-#include "utils/hsearch.h"
 #include "utils/rel.h"
 #include "utils/snapmgr.h"
 #include "utils/syscache.h"
diff --git a/src/backend/utils/cache/relcache.c b/src/backend/utils/cache/relcache.c
index 585dcee..ad1ff01 100644
--- a/src/backend/utils/cache/relcache.c
+++ b/src/backend/utils/cache/relcache.c
@@ -47,8 +47,8 @@
 #include "catalog/pg_am.h"
 #include "catalog/pg_amproc.h"
 #include "catalog/pg_attrdef.h"
-#include "catalog/pg_authid.h"
 #include "catalog/pg_auth_members.h"
+#include "catalog/pg_authid.h"
 #include "catalog/pg_constraint.h"
 #include "catalog/pg_database.h"
 #include "catalog/pg_namespace.h"
@@ -90,7 +90,6 @@
 #include "utils/snapmgr.h"
 #include "utils/syscache.h"
 
-
 #define RELCACHE_INIT_FILEMAGIC		0x573266	/* version ID value */
 
 /*
diff --git a/src/backend/utils/cache/relfilenodemap.c b/src/backend/utils/cache/relfilenodemap.c
index c506dc9..d244eaf 100644
--- a/src/backend/utils/cache/relfilenodemap.c
+++ b/src/backend/utils/cache/relfilenodemap.c
@@ -22,9 +22,9 @@
 #include "miscadmin.h"
 #include "utils/builtins.h"
 #include "utils/catcache.h"
+#include "utils/fmgroids.h"
 #include "utils/hsearch.h"
 #include "utils/inval.h"
-#include "utils/fmgroids.h"
 #include "utils/rel.h"
 #include "utils/relfilenodemap.h"
 #include "utils/relmapper.h"
diff --git a/src/backend/utils/cache/syscache.c b/src/backend/utils/cache/syscache.c
index 16297a5..13a34d5 100644
--- a/src/backend/utils/cache/syscache.c
+++ b/src/backend/utils/cache/syscache.c
@@ -74,11 +74,10 @@
 #include "catalog/pg_ts_template.h"
 #include "catalog/pg_type.h"
 #include "catalog/pg_user_mapping.h"
-#include "utils/rel.h"
 #include "utils/catcache.h"
+#include "utils/rel.h"
 #include "utils/syscache.h"
 
-
 /*---------------------------------------------------------------------------
 
 	Adding system caches:
diff --git a/src/backend/utils/mb/conversion_procs/utf8_and_cyrillic/utf8_and_cyrillic.c b/src/backend/utils/mb/conversion_procs/utf8_and_cyrillic/utf8_and_cyrillic.c
index 10222d5..3c4689a 100644
--- a/src/backend/utils/mb/conversion_procs/utf8_and_cyrillic/utf8_and_cyrillic.c
+++ b/src/backend/utils/mb/conversion_procs/utf8_and_cyrillic/utf8_and_cyrillic.c
@@ -15,8 +15,8 @@
 #include "fmgr.h"
 #include "mb/pg_wchar.h"
 #include "../../Unicode/utf8_to_koi8r.map"
-#include "../../Unicode/koi8r_to_utf8.map"
 #include "../../Unicode/utf8_to_koi8u.map"
+#include "../../Unicode/koi8r_to_utf8.map"
 #include "../../Unicode/koi8u_to_utf8.map"
 
 PG_MODULE_MAGIC;
diff --git a/src/backend/utils/mb/conversion_procs/utf8_and_iso8859/utf8_and_iso8859.c b/src/backend/utils/mb/conversion_procs/utf8_and_iso8859/utf8_and_iso8859.c
index e33ca42..34ddcba 100644
--- a/src/backend/utils/mb/conversion_procs/utf8_and_iso8859/utf8_and_iso8859.c
+++ b/src/backend/utils/mb/conversion_procs/utf8_and_iso8859/utf8_and_iso8859.c
@@ -12,12 +12,14 @@
  */
 
 #include "postgres.h"
+
 #include "fmgr.h"
 #include "mb/pg_wchar.h"
 #include "../../Unicode/iso8859_10_to_utf8.map"
 #include "../../Unicode/iso8859_13_to_utf8.map"
 #include "../../Unicode/iso8859_14_to_utf8.map"
 #include "../../Unicode/iso8859_15_to_utf8.map"
+#include "../../Unicode/iso8859_16_to_utf8.map"
 #include "../../Unicode/iso8859_2_to_utf8.map"
 #include "../../Unicode/iso8859_3_to_utf8.map"
 #include "../../Unicode/iso8859_4_to_utf8.map"
@@ -39,7 +41,6 @@
 #include "../../Unicode/utf8_to_iso8859_7.map"
 #include "../../Unicode/utf8_to_iso8859_8.map"
 #include "../../Unicode/utf8_to_iso8859_9.map"
-#include "../../Unicode/iso8859_16_to_utf8.map"
 
 PG_MODULE_MAGIC;
 
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c
index 31a5ef0..0364709 100644
--- a/src/backend/utils/misc/guc.c
+++ b/src/backend/utils/misc/guc.c
@@ -38,10 +38,10 @@
 #include "catalog/pg_authid.h"
 #include "commands/async.h"
 #include "commands/prepare.h"
+#include "commands/trigger.h"
 #include "commands/user.h"
 #include "commands/vacuum.h"
 #include "commands/variable.h"
-#include "commands/trigger.h"
 #include "common/string.h"
 #include "funcapi.h"
 #include "jit/jit.h"
@@ -72,18 +72,18 @@
 #include "replication/walsender.h"
 #include "storage/bufmgr.h"
 #include "storage/dsm_impl.h"
-#include "storage/standby.h"
 #include "storage/fd.h"
 #include "storage/large_object.h"
 #include "storage/pg_shmem.h"
-#include "storage/proc.h"
 #include "storage/predicate.h"
+#include "storage/proc.h"
+#include "storage/standby.h"
 #include "tcop/tcopprot.h"
 #include "tsearch/ts_cache.h"
 #include "utils/builtins.h"
 #include "utils/bytea.h"
-#include "utils/guc_tables.h"
 #include "utils/float.h"
+#include "utils/guc_tables.h"
 #include "utils/memutils.h"
 #include "utils/pg_locale.h"
 #include "utils/pg_lsn.h"
diff --git a/src/backend/utils/misc/pg_config.c b/src/backend/utils/misc/pg_config.c
index 2d17839..8cab0e1 100644
--- a/src/backend/utils/misc/pg_config.c
+++ b/src/backend/utils/misc/pg_config.c
@@ -14,12 +14,12 @@
 
 #include "postgres.h"
 
-#include "funcapi.h"
-#include "miscadmin.h"
 #include "catalog/pg_type.h"
 #include "common/config_info.h"
-#include "utils/builtins.h"
+#include "funcapi.h"
+#include "miscadmin.h"
 #include "port.h"
+#include "utils/builtins.h"
 
 Datum
 pg_config(PG_FUNCTION_ARGS)
diff --git a/src/backend/utils/misc/pg_controldata.c b/src/backend/utils/misc/pg_controldata.c
index b429218..3d0916f 100644
--- a/src/backend/utils/misc/pg_controldata.c
+++ b/src/backend/utils/misc/pg_controldata.c
@@ -17,8 +17,8 @@
 
 #include "access/htup_details.h"
 #include "access/transam.h"
-#include "access/xlog_internal.h"
 #include "access/xlog.h"
+#include "access/xlog_internal.h"
 #include "catalog/pg_control.h"
 #include "catalog/pg_type.h"
 #include "common/controldata_utils.h"
diff --git a/src/backend/utils/misc/ps_status.c b/src/backend/utils/misc/ps_status.c
index 67ba95c..6c851dd 100644
--- a/src/backend/utils/misc/ps_status.c
+++ b/src/backend/utils/misc/ps_status.c
@@ -28,8 +28,8 @@
 
 #include "libpq/libpq.h"
 #include "miscadmin.h"
-#include "utils/ps_status.h"
 #include "utils/guc.h"
+#include "utils/ps_status.h"
 
 extern char **environ;
 bool		update_process_title = true;
diff --git a/src/backend/utils/misc/superuser.c b/src/backend/utils/misc/superuser.c
index 5636081..327dca6 100644
--- a/src/backend/utils/misc/superuser.c
+++ b/src/backend/utils/misc/superuser.c
@@ -22,10 +22,9 @@
 
 #include "access/htup_details.h"
 #include "catalog/pg_authid.h"
+#include "miscadmin.h"
 #include "utils/inval.h"
 #include "utils/syscache.h"
-#include "miscadmin.h"
-
 
 /*
  * In common cases the same roleid (ie, the session or current ID) will
diff --git a/src/backend/utils/mmgr/slab.c b/src/backend/utils/mmgr/slab.c
index 50deb35..db1dac3 100644
--- a/src/backend/utils/mmgr/slab.c
+++ b/src/backend/utils/mmgr/slab.c
@@ -52,10 +52,9 @@
 
 #include "postgres.h"
 
+#include "lib/ilist.h"
 #include "utils/memdebug.h"
 #include "utils/memutils.h"
-#include "lib/ilist.h"
-
 
 /*
  * SlabContext is a specialized implementation of MemoryContext.
diff --git a/src/backend/utils/time/combocid.c b/src/backend/utils/time/combocid.c
index deb9af5..16d464d 100644
--- a/src/backend/utils/time/combocid.c
+++ b/src/backend/utils/time/combocid.c
@@ -41,15 +41,14 @@
 
 #include "postgres.h"
 
-#include "miscadmin.h"
 #include "access/htup_details.h"
 #include "access/xact.h"
+#include "miscadmin.h"
 #include "storage/shmem.h"
 #include "utils/combocid.h"
 #include "utils/hsearch.h"
 #include "utils/memutils.h"
 
-
 /* Hash table to lookup combo cids by cmin and cmax */
 static HTAB *comboHash = NULL;
 
-- 
1.8.3.1

