From 365b6f236589b02ada99b55acdc4cfff33c71a05 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Thu, 8 Feb 2024 16:26:33 +0100 Subject: [PATCH 1/5] Remove unused #include's from backend .c files as determined by IWYU --- src/backend/access/brin/brin_bloom.c | 1 - src/backend/access/gin/ginvacuum.c | 1 - src/backend/access/heap/vacuumlazy.c | 2 -- src/backend/access/nbtree/nbtree.c | 3 --- src/backend/access/nbtree/nbtsort.c | 1 - src/backend/access/sequence/sequence.c | 2 +- src/backend/access/transam/slru.c | 2 +- src/backend/access/transam/xlog.c | 2 -- src/backend/backup/basebackup.c | 1 - src/backend/backup/basebackup_incremental.c | 2 -- src/backend/catalog/pg_depend.c | 1 - src/backend/commands/analyze.c | 2 -- src/backend/commands/cluster.c | 1 - src/backend/commands/copyfromparse.c | 1 - src/backend/commands/createas.c | 2 -- src/backend/commands/indexcmds.c | 1 - src/backend/commands/vacuum.c | 1 - src/backend/commands/waitlsn.c | 2 -- src/backend/executor/nodeBitmapHeapscan.c | 1 - src/backend/executor/nodeHash.c | 1 - src/backend/lib/integerset.c | 1 - src/backend/libpq/be-secure-gssapi.c | 2 +- src/backend/libpq/be-secure-openssl.c | 3 +-- src/backend/main/main.c | 1 - src/backend/parser/gram.y | 4 --- src/backend/parser/parse_clause.c | 2 -- src/backend/parser/parse_expr.c | 2 -- src/backend/parser/parse_jsontable.c | 4 +-- src/backend/postmaster/auxprocess.c | 5 ---- src/backend/postmaster/launch_backend.c | 26 +++++++------------ src/backend/postmaster/postmaster.c | 5 +--- src/backend/postmaster/walwriter.c | 2 -- src/backend/replication/logical/slotsync.c | 2 -- src/backend/replication/slotfuncs.c | 4 --- src/backend/storage/aio/read_stream.c | 1 - src/backend/storage/buffer/buf_init.c | 1 - src/backend/storage/file/fd.c | 1 - src/backend/storage/ipc/ipci.c | 2 -- src/backend/storage/ipc/sinvaladt.c | 1 - src/backend/storage/lmgr/lmgr.c | 1 - src/backend/storage/lmgr/lock.c | 1 - src/backend/storage/lmgr/s_lock.c | 1 - src/backend/storage/page/checksum.c | 2 +- src/backend/storage/smgr/bulk_write.c | 1 - src/backend/tcop/fastpath.c | 1 - src/backend/tcop/postgres.c | 1 - src/backend/utils/Gen_fmgrtab.pl | 1 - src/backend/utils/activity/backend_progress.c | 1 - src/backend/utils/activity/backend_status.c | 2 -- src/backend/utils/activity/pgstat.c | 1 - src/backend/utils/activity/pgstat_relation.c | 1 - src/backend/utils/activity/wait_event.c | 1 - src/backend/utils/adt/float.c | 1 - src/backend/utils/adt/jsonpath_exec.c | 2 -- src/backend/utils/adt/pg_upgrade_support.c | 1 - src/backend/utils/adt/waitfuncs.c | 2 +- src/backend/utils/hash/pg_crc.c | 2 +- src/backend/utils/misc/injection_point.c | 7 ++--- src/backend/utils/misc/pg_config.c | 1 - 59 files changed, 22 insertions(+), 108 deletions(-) diff --git a/src/backend/access/brin/brin_bloom.c b/src/backend/access/brin/brin_bloom.c index f94e2b0bfbd..2e210d3e227 100644 --- a/src/backend/access/brin/brin_bloom.c +++ b/src/backend/access/brin/brin_bloom.c @@ -124,7 +124,6 @@ #include "access/htup_details.h" #include "access/reloptions.h" #include "catalog/pg_am.h" -#include "catalog/pg_amop.h" #include "catalog/pg_type.h" #include "common/hashfn.h" #include "utils/fmgrprotos.h" diff --git a/src/backend/access/gin/ginvacuum.c b/src/backend/access/gin/ginvacuum.c index b3f415e2849..c6e8b39d4c9 100644 --- a/src/backend/access/gin/ginvacuum.c +++ b/src/backend/access/gin/ginvacuum.c @@ -19,7 +19,6 @@ #include "access/xloginsert.h" #include "commands/vacuum.h" #include "miscadmin.h" -#include "postmaster/autovacuum.h" #include "storage/indexfsm.h" #include "storage/lmgr.h" #include "storage/predicate.h" diff --git a/src/backend/access/heap/vacuumlazy.c b/src/backend/access/heap/vacuumlazy.c index d82aa3d4896..793bd33cb4d 100644 --- a/src/backend/access/heap/vacuumlazy.c +++ b/src/backend/access/heap/vacuumlazy.c @@ -35,7 +35,6 @@ #include "access/genam.h" #include "access/heapam.h" -#include "access/heapam_xlog.h" #include "access/htup_details.h" #include "access/multixact.h" #include "access/tidstore.h" @@ -56,7 +55,6 @@ #include "storage/freespace.h" #include "storage/lmgr.h" #include "utils/lsyscache.h" -#include "utils/memutils.h" #include "utils/pg_rusage.h" #include "utils/timestamp.h" diff --git a/src/backend/access/nbtree/nbtree.c b/src/backend/access/nbtree/nbtree.c index f4f79f27062..484ede8c2e1 100644 --- a/src/backend/access/nbtree/nbtree.c +++ b/src/backend/access/nbtree/nbtree.c @@ -20,10 +20,8 @@ #include "access/nbtree.h" #include "access/relscan.h" -#include "access/xloginsert.h" #include "commands/progress.h" #include "commands/vacuum.h" -#include "miscadmin.h" #include "nodes/execnodes.h" #include "pgstat.h" #include "storage/bulk_write.h" @@ -31,7 +29,6 @@ #include "storage/indexfsm.h" #include "storage/ipc.h" #include "storage/lmgr.h" -#include "storage/smgr.h" #include "utils/fmgrprotos.h" #include "utils/index_selfuncs.h" #include "utils/memutils.h" diff --git a/src/backend/access/nbtree/nbtsort.c b/src/backend/access/nbtree/nbtsort.c index 5cca0d4f520..fb9a05f7af1 100644 --- a/src/backend/access/nbtree/nbtsort.c +++ b/src/backend/access/nbtree/nbtsort.c @@ -45,7 +45,6 @@ #include "access/relscan.h" #include "access/table.h" #include "access/xact.h" -#include "access/xloginsert.h" #include "catalog/index.h" #include "commands/progress.h" #include "executor/instrument.h" diff --git a/src/backend/access/sequence/sequence.c b/src/backend/access/sequence/sequence.c index 8d6b7bb5dc2..d2cf95aadc2 100644 --- a/src/backend/access/sequence/sequence.c +++ b/src/backend/access/sequence/sequence.c @@ -22,7 +22,7 @@ #include "access/relation.h" #include "access/sequence.h" -#include "storage/lmgr.h" +#include "utils/rel.h" static inline void validate_relation_kind(Relation r); diff --git a/src/backend/access/transam/slru.c b/src/backend/access/transam/slru.c index 889eff1815b..f249c3cd05e 100644 --- a/src/backend/access/transam/slru.c +++ b/src/backend/access/transam/slru.c @@ -70,7 +70,7 @@ #include "pgstat.h" #include "storage/fd.h" #include "storage/shmem.h" -#include "utils/guc_hooks.h" +#include "utils/guc.h" /* * Converts segment number to the filename of the segment. diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index 9102c8d772e..11f623cabd1 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -74,7 +74,6 @@ #include "pg_trace.h" #include "pgstat.h" #include "port/atomics.h" -#include "port/pg_iovec.h" #include "postmaster/bgwriter.h" #include "postmaster/startup.h" #include "postmaster/walsummarizer.h" @@ -98,7 +97,6 @@ #include "utils/guc_hooks.h" #include "utils/guc_tables.h" #include "utils/injection_point.h" -#include "utils/memutils.h" #include "utils/ps_status.h" #include "utils/relmapper.h" #include "utils/snapmgr.h" diff --git a/src/backend/backup/basebackup.c b/src/backend/backup/basebackup.c index 0f8cddcbeeb..e2ed9081d1c 100644 --- a/src/backend/backup/basebackup.c +++ b/src/backend/backup/basebackup.c @@ -33,7 +33,6 @@ #include "nodes/pg_list.h" #include "pgstat.h" #include "pgtar.h" -#include "port.h" #include "postmaster/syslogger.h" #include "postmaster/walsummarizer.h" #include "replication/slot.h" diff --git a/src/backend/backup/basebackup_incremental.c b/src/backend/backup/basebackup_incremental.c index f581a5f9e68..275615877eb 100644 --- a/src/backend/backup/basebackup_incremental.c +++ b/src/backend/backup/basebackup_incremental.c @@ -27,9 +27,7 @@ #include "common/hashfn.h" #include "common/int.h" #include "common/parse_manifest.h" -#include "datatype/timestamp.h" #include "postmaster/walsummarizer.h" -#include "utils/timestamp.h" #define BLOCKS_PER_READ 512 diff --git a/src/backend/catalog/pg_depend.c b/src/backend/catalog/pg_depend.c index cfd7ef51dfa..2b4514e8a35 100644 --- a/src/backend/catalog/pg_depend.c +++ b/src/backend/catalog/pg_depend.c @@ -28,7 +28,6 @@ #include "miscadmin.h" #include "utils/fmgroids.h" #include "utils/lsyscache.h" -#include "utils/syscache.h" #include "utils/rel.h" diff --git a/src/backend/commands/analyze.c b/src/backend/commands/analyze.c index 38fb4c3ef23..9a56de2282f 100644 --- a/src/backend/commands/analyze.c +++ b/src/backend/commands/analyze.c @@ -41,7 +41,6 @@ #include "parser/parse_oper.h" #include "parser/parse_relation.h" #include "pgstat.h" -#include "postmaster/autovacuum.h" #include "statistics/extended_stats_internal.h" #include "statistics/statistics.h" #include "storage/bufmgr.h" @@ -54,7 +53,6 @@ #include "utils/pg_rusage.h" #include "utils/sampling.h" #include "utils/sortsupport.h" -#include "utils/spccache.h" #include "utils/syscache.h" #include "utils/timestamp.h" diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c index 78f96789b0e..ae0863d9a25 100644 --- a/src/backend/commands/cluster.c +++ b/src/backend/commands/cluster.c @@ -32,7 +32,6 @@ #include "catalog/namespace.h" #include "catalog/objectaccess.h" #include "catalog/pg_am.h" -#include "catalog/pg_database.h" #include "catalog/pg_inherits.h" #include "catalog/toasting.h" #include "commands/cluster.h" diff --git a/src/backend/commands/copyfromparse.c b/src/backend/commands/copyfromparse.c index 654fecb1b14..d1d43b53d83 100644 --- a/src/backend/commands/copyfromparse.c +++ b/src/backend/commands/copyfromparse.c @@ -70,7 +70,6 @@ #include "libpq/pqformat.h" #include "mb/pg_wchar.h" #include "miscadmin.h" -#include "nodes/miscnodes.h" #include "pgstat.h" #include "port/pg_bswap.h" #include "utils/builtins.h" diff --git a/src/backend/commands/createas.c b/src/backend/commands/createas.c index 68ec122dbf9..aaeaaffe405 100644 --- a/src/backend/commands/createas.c +++ b/src/backend/commands/createas.c @@ -35,14 +35,12 @@ #include "commands/prepare.h" #include "commands/tablecmds.h" #include "commands/view.h" -#include "miscadmin.h" #include "nodes/makefuncs.h" #include "nodes/nodeFuncs.h" #include "rewrite/rewriteHandler.h" #include "tcop/tcopprot.h" #include "utils/builtins.h" #include "utils/lsyscache.h" -#include "utils/rel.h" #include "utils/rls.h" #include "utils/snapmgr.h" diff --git a/src/backend/commands/indexcmds.c b/src/backend/commands/indexcmds.c index e33ad815295..2f652463e3c 100644 --- a/src/backend/commands/indexcmds.c +++ b/src/backend/commands/indexcmds.c @@ -58,7 +58,6 @@ #include "storage/lmgr.h" #include "storage/proc.h" #include "storage/procarray.h" -#include "storage/sinvaladt.h" #include "utils/acl.h" #include "utils/builtins.h" #include "utils/fmgroids.h" diff --git a/src/backend/commands/vacuum.c b/src/backend/commands/vacuum.c index ac8f5d9c259..86f36b36954 100644 --- a/src/backend/commands/vacuum.c +++ b/src/backend/commands/vacuum.c @@ -34,7 +34,6 @@ #include "access/tableam.h" #include "access/transam.h" #include "access/xact.h" -#include "catalog/index.h" #include "catalog/namespace.h" #include "catalog/pg_database.h" #include "catalog/pg_inherits.h" diff --git a/src/backend/commands/waitlsn.c b/src/backend/commands/waitlsn.c index 501938f4330..ce1537136c8 100644 --- a/src/backend/commands/waitlsn.c +++ b/src/backend/commands/waitlsn.c @@ -21,7 +21,6 @@ #include "access/xlog.h" #include "access/xlogrecovery.h" #include "commands/waitlsn.h" -#include "funcapi.h" #include "miscadmin.h" #include "storage/latch.h" #include "storage/proc.h" @@ -29,7 +28,6 @@ #include "utils/fmgrprotos.h" #include "utils/pg_lsn.h" #include "utils/snapmgr.h" -#include "utils/wait_event_types.h" static int waitlsn_cmp(const pairingheap_node *a, const pairingheap_node *b, void *arg); diff --git a/src/backend/executor/nodeBitmapHeapscan.c b/src/backend/executor/nodeBitmapHeapscan.c index 3c63bdd93df..01d825c47bd 100644 --- a/src/backend/executor/nodeBitmapHeapscan.c +++ b/src/backend/executor/nodeBitmapHeapscan.c @@ -46,7 +46,6 @@ #include "pgstat.h" #include "storage/bufmgr.h" #include "utils/rel.h" -#include "utils/snapmgr.h" #include "utils/spccache.h" static TupleTableSlot *BitmapHeapNext(BitmapHeapScanState *node); diff --git a/src/backend/executor/nodeHash.c b/src/backend/executor/nodeHash.c index 0456a017dc6..3e22d50e3a4 100644 --- a/src/backend/executor/nodeHash.c +++ b/src/backend/executor/nodeHash.c @@ -35,7 +35,6 @@ #include "executor/nodeHash.h" #include "executor/nodeHashjoin.h" #include "miscadmin.h" -#include "port/atomics.h" #include "port/pg_bitutils.h" #include "utils/dynahash.h" #include "utils/lsyscache.h" diff --git a/src/backend/lib/integerset.c b/src/backend/lib/integerset.c index 9f1d4db52b2..bd9b28e19bd 100644 --- a/src/backend/lib/integerset.c +++ b/src/backend/lib/integerset.c @@ -72,7 +72,6 @@ #include "postgres.h" #include "lib/integerset.h" -#include "port/pg_bitutils.h" #include "utils/memutils.h" diff --git a/src/backend/libpq/be-secure-gssapi.c b/src/backend/libpq/be-secure-gssapi.c index 2d36c76324a..5a009776d12 100644 --- a/src/backend/libpq/be-secure-gssapi.c +++ b/src/backend/libpq/be-secure-gssapi.c @@ -18,9 +18,9 @@ #include "libpq/auth.h" #include "libpq/be-gssapi-common.h" #include "libpq/libpq.h" -#include "libpq/pqformat.h" #include "miscadmin.h" #include "pgstat.h" +#include "port/pg_bswap.h" #include "utils/injection_point.h" #include "utils/memutils.h" diff --git a/src/backend/libpq/be-secure-openssl.c b/src/backend/libpq/be-secure-openssl.c index 9d503104be3..b3d3f83a157 100644 --- a/src/backend/libpq/be-secure-openssl.c +++ b/src/backend/libpq/be-secure-openssl.c @@ -33,8 +33,7 @@ #include "pgstat.h" #include "storage/fd.h" #include "storage/latch.h" -#include "tcop/tcopprot.h" -#include "utils/builtins.h" +#include "utils/guc.h" #include "utils/memutils.h" /* diff --git a/src/backend/main/main.c b/src/backend/main/main.c index 4672aab8378..aea93a02298 100644 --- a/src/backend/main/main.c +++ b/src/backend/main/main.c @@ -32,7 +32,6 @@ #include "bootstrap/bootstrap.h" #include "common/username.h" -#include "port/atomics.h" #include "postmaster/postmaster.h" #include "tcop/tcopprot.h" #include "utils/help_config.h" diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y index 4aa8646af7b..f63d1538df7 100644 --- a/src/backend/parser/gram.y +++ b/src/backend/parser/gram.y @@ -48,7 +48,6 @@ #include #include -#include "access/tableam.h" #include "catalog/index.h" #include "catalog/namespace.h" #include "catalog/pg_am.h" @@ -59,10 +58,7 @@ #include "nodes/makefuncs.h" #include "nodes/nodeFuncs.h" #include "parser/parser.h" -#include "storage/lmgr.h" -#include "utils/date.h" #include "utils/datetime.h" -#include "utils/numeric.h" #include "utils/xml.h" diff --git a/src/backend/parser/parse_clause.c b/src/backend/parser/parse_clause.c index 4c976909088..979926b6052 100644 --- a/src/backend/parser/parse_clause.c +++ b/src/backend/parser/parse_clause.c @@ -40,11 +40,9 @@ #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/catcache.h" -#include "utils/guc.h" #include "utils/lsyscache.h" #include "utils/rel.h" #include "utils/syscache.h" diff --git a/src/backend/parser/parse_expr.c b/src/backend/parser/parse_expr.c index ef0b560f5e3..c2806297aa4 100644 --- a/src/backend/parser/parse_expr.c +++ b/src/backend/parser/parse_expr.c @@ -16,7 +16,6 @@ #include "postgres.h" #include "catalog/pg_aggregate.h" -#include "catalog/pg_proc.h" #include "catalog/pg_type.h" #include "commands/dbcommands.h" #include "miscadmin.h" @@ -37,7 +36,6 @@ #include "utils/builtins.h" #include "utils/date.h" #include "utils/fmgroids.h" -#include "utils/jsonb.h" #include "utils/lsyscache.h" #include "utils/timestamp.h" #include "utils/xml.h" diff --git a/src/backend/parser/parse_jsontable.c b/src/backend/parser/parse_jsontable.c index 6d4e4968202..ecb140e6e71 100644 --- a/src/backend/parser/parse_jsontable.c +++ b/src/backend/parser/parse_jsontable.c @@ -15,9 +15,7 @@ #include "postgres.h" -#include "catalog/pg_collation.h" #include "catalog/pg_type.h" -#include "miscadmin.h" #include "nodes/makefuncs.h" #include "nodes/nodeFuncs.h" #include "optimizer/optimizer.h" @@ -26,7 +24,7 @@ #include "parser/parse_expr.h" #include "parser/parse_relation.h" #include "parser/parse_type.h" -#include "utils/builtins.h" +#include "utils/fmgrprotos.h" #include "utils/json.h" #include "utils/lsyscache.h" diff --git a/src/backend/postmaster/auxprocess.c b/src/backend/postmaster/auxprocess.c index 74b8a00c94b..d19174bda39 100644 --- a/src/backend/postmaster/auxprocess.c +++ b/src/backend/postmaster/auxprocess.c @@ -18,11 +18,6 @@ #include "miscadmin.h" #include "pgstat.h" #include "postmaster/auxprocess.h" -#include "postmaster/bgwriter.h" -#include "postmaster/startup.h" -#include "postmaster/walsummarizer.h" -#include "postmaster/walwriter.h" -#include "replication/walreceiver.h" #include "storage/condition_variable.h" #include "storage/ipc.h" #include "storage/proc.h" diff --git a/src/backend/postmaster/launch_backend.c b/src/backend/postmaster/launch_backend.c index 0ae23fdf55e..25020cedad0 100644 --- a/src/backend/postmaster/launch_backend.c +++ b/src/backend/postmaster/launch_backend.c @@ -33,15 +33,9 @@ #include -#include "access/xlog.h" -#include "common/file_utils.h" #include "libpq/libpq-be.h" -#include "libpq/pqsignal.h" #include "miscadmin.h" -#include "nodes/queryjumble.h" -#include "port.h" #include "postmaster/autovacuum.h" -#include "postmaster/auxprocess.h" #include "postmaster/bgworker_internals.h" #include "postmaster/bgwriter.h" #include "postmaster/fork_process.h" @@ -54,20 +48,9 @@ #include "replication/slotsync.h" #include "replication/walreceiver.h" #include "storage/dsm.h" -#include "storage/fd.h" -#include "storage/ipc.h" #include "storage/pg_shmem.h" -#include "storage/pmsignal.h" -#include "storage/proc.h" -#include "storage/procsignal.h" #include "tcop/backend_startup.h" -#include "tcop/tcopprot.h" -#include "utils/builtins.h" -#include "utils/datetime.h" -#include "utils/guc.h" -#include "utils/injection_point.h" #include "utils/memutils.h" -#include "utils/timestamp.h" #ifdef EXEC_BACKEND #include "nodes/queryjumble.h" @@ -78,6 +61,15 @@ #ifdef EXEC_BACKEND +#include "common/file_utils.h" +#include "storage/fd.h" +#include "storage/lwlock.h" +#include "storage/pmsignal.h" +#include "storage/proc.h" +#include "storage/procsignal.h" +#include "tcop/tcopprot.h" +#include "utils/injection_point.h" + /* Type for a socket that can be inherited to a client process */ #ifdef WIN32 typedef struct diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c index 85fd24e8287..407f55996ba 100644 --- a/src/backend/postmaster/postmaster.c +++ b/src/backend/postmaster/postmaster.c @@ -92,8 +92,6 @@ #include "access/xlog.h" #include "access/xlogrecovery.h" #include "common/file_perm.h" -#include "common/file_utils.h" -#include "common/ip.h" #include "common/pg_prng.h" #include "lib/ilist.h" #include "libpq/libpq.h" @@ -102,7 +100,6 @@ #include "pgstat.h" #include "port/pg_bswap.h" #include "postmaster/autovacuum.h" -#include "postmaster/auxprocess.h" #include "postmaster/bgworker_internals.h" #include "postmaster/pgarch.h" #include "postmaster/postmaster.h" @@ -114,7 +111,6 @@ #include "storage/fd.h" #include "storage/ipc.h" #include "storage/pmsignal.h" -#include "storage/proc.h" #include "tcop/backend_startup.h" #include "tcop/tcopprot.h" #include "utils/datetime.h" @@ -124,6 +120,7 @@ #include "utils/varlena.h" #ifdef EXEC_BACKEND +#include "common/file_utils.h" #include "storage/pg_shmem.h" #endif diff --git a/src/backend/postmaster/walwriter.c b/src/backend/postmaster/walwriter.c index 6e7918a78d4..91013f6e936 100644 --- a/src/backend/postmaster/walwriter.c +++ b/src/backend/postmaster/walwriter.c @@ -54,12 +54,10 @@ #include "storage/bufmgr.h" #include "storage/condition_variable.h" #include "storage/fd.h" -#include "storage/ipc.h" #include "storage/lwlock.h" #include "storage/proc.h" #include "storage/procsignal.h" #include "storage/smgr.h" -#include "utils/guc.h" #include "utils/hsearch.h" #include "utils/memutils.h" #include "utils/resowner.h" diff --git a/src/backend/replication/logical/slotsync.c b/src/backend/replication/logical/slotsync.c index f9649eec1a5..d62186a5107 100644 --- a/src/backend/replication/logical/slotsync.c +++ b/src/backend/replication/logical/slotsync.c @@ -55,9 +55,7 @@ #include "commands/dbcommands.h" #include "libpq/pqsignal.h" #include "pgstat.h" -#include "postmaster/fork_process.h" #include "postmaster/interrupt.h" -#include "postmaster/postmaster.h" #include "replication/logical.h" #include "replication/slotsync.h" #include "replication/snapbuild.h" diff --git a/src/backend/replication/slotfuncs.c b/src/backend/replication/slotfuncs.c index c7bfbb15e0a..488a161b3e7 100644 --- a/src/backend/replication/slotfuncs.c +++ b/src/backend/replication/slotfuncs.c @@ -17,16 +17,12 @@ #include "access/xlogrecovery.h" #include "access/xlogutils.h" #include "funcapi.h" -#include "miscadmin.h" -#include "replication/decode.h" #include "replication/logical.h" #include "replication/slot.h" #include "replication/slotsync.h" #include "utils/builtins.h" #include "utils/guc.h" -#include "utils/inval.h" #include "utils/pg_lsn.h" -#include "utils/resowner.h" /* * Helper function for creating a new physical replication slot with diff --git a/src/backend/storage/aio/read_stream.c b/src/backend/storage/aio/read_stream.c index b8ea1180e25..3d30e6224f7 100644 --- a/src/backend/storage/aio/read_stream.c +++ b/src/backend/storage/aio/read_stream.c @@ -89,7 +89,6 @@ */ #include "postgres.h" -#include "catalog/pg_tablespace.h" #include "miscadmin.h" #include "storage/fd.h" #include "storage/smgr.h" diff --git a/src/backend/storage/buffer/buf_init.c b/src/backend/storage/buffer/buf_init.c index 09bec6449b6..56761a8eedc 100644 --- a/src/backend/storage/buffer/buf_init.c +++ b/src/backend/storage/buffer/buf_init.c @@ -16,7 +16,6 @@ #include "storage/buf_internals.h" #include "storage/bufmgr.h" -#include "storage/proc.h" BufferDescPadded *BufferDescriptors; char *BufferBlocks; diff --git a/src/backend/storage/file/fd.c b/src/backend/storage/file/fd.c index ec1505802b9..42bf857e873 100644 --- a/src/backend/storage/file/fd.c +++ b/src/backend/storage/file/fd.c @@ -93,7 +93,6 @@ #include "common/pg_prng.h" #include "miscadmin.h" #include "pgstat.h" -#include "portability/mem.h" #include "postmaster/startup.h" #include "storage/fd.h" #include "storage/ipc.h" diff --git a/src/backend/storage/ipc/ipci.c b/src/backend/storage/ipc/ipci.c index 10fc18f2529..b0852564388 100644 --- a/src/backend/storage/ipc/ipci.c +++ b/src/backend/storage/ipc/ipci.c @@ -31,7 +31,6 @@ #include "postmaster/autovacuum.h" #include "postmaster/bgworker_internals.h" #include "postmaster/bgwriter.h" -#include "postmaster/postmaster.h" #include "postmaster/walsummarizer.h" #include "replication/logicallauncher.h" #include "replication/origin.h" @@ -50,7 +49,6 @@ #include "storage/procarray.h" #include "storage/procsignal.h" #include "storage/sinvaladt.h" -#include "storage/spin.h" #include "utils/guc.h" #include "utils/injection_point.h" diff --git a/src/backend/storage/ipc/sinvaladt.c b/src/backend/storage/ipc/sinvaladt.c index db59637c438..ff817449a44 100644 --- a/src/backend/storage/ipc/sinvaladt.c +++ b/src/backend/storage/ipc/sinvaladt.c @@ -17,7 +17,6 @@ #include #include -#include "access/transam.h" #include "miscadmin.h" #include "storage/ipc.h" #include "storage/proc.h" diff --git a/src/backend/storage/lmgr/lmgr.c b/src/backend/storage/lmgr/lmgr.c index 094522acb41..9f43620e472 100644 --- a/src/backend/storage/lmgr/lmgr.c +++ b/src/backend/storage/lmgr/lmgr.c @@ -24,7 +24,6 @@ #include "storage/lmgr.h" #include "storage/proc.h" #include "storage/procarray.h" -#include "storage/sinvaladt.h" #include "utils/inval.h" diff --git a/src/backend/storage/lmgr/lock.c b/src/backend/storage/lmgr/lock.c index 09a8ac15784..97c0fd469dc 100644 --- a/src/backend/storage/lmgr/lock.c +++ b/src/backend/storage/lmgr/lock.c @@ -41,7 +41,6 @@ #include "pg_trace.h" #include "storage/proc.h" #include "storage/procarray.h" -#include "storage/sinvaladt.h" #include "storage/spin.h" #include "storage/standby.h" #include "utils/memutils.h" diff --git a/src/backend/storage/lmgr/s_lock.c b/src/backend/storage/lmgr/s_lock.c index 69549a65dba..f37d338566f 100644 --- a/src/backend/storage/lmgr/s_lock.c +++ b/src/backend/storage/lmgr/s_lock.c @@ -51,7 +51,6 @@ #include #include "common/pg_prng.h" -#include "port/atomics.h" #include "storage/s_lock.h" #include "utils/wait_event.h" diff --git a/src/backend/storage/page/checksum.c b/src/backend/storage/page/checksum.c index 243878fe9e0..ffc3d245887 100644 --- a/src/backend/storage/page/checksum.c +++ b/src/backend/storage/page/checksum.c @@ -19,4 +19,4 @@ * external programs can incorporate the checksum code by #include'ing * that file from the exported Postgres headers. (Compare our CRC code.) */ -#include "storage/checksum_impl.h" +#include "storage/checksum_impl.h" /* IWYU pragma: keep */ diff --git a/src/backend/storage/smgr/bulk_write.c b/src/backend/storage/smgr/bulk_write.c index 1a5f3ce96e1..f0a65bfe242 100644 --- a/src/backend/storage/smgr/bulk_write.c +++ b/src/backend/storage/smgr/bulk_write.c @@ -36,7 +36,6 @@ #include "access/xloginsert.h" #include "access/xlogrecord.h" -#include "storage/bufmgr.h" #include "storage/bufpage.h" #include "storage/bulk_write.h" #include "storage/proc.h" diff --git a/src/backend/tcop/fastpath.c b/src/backend/tcop/fastpath.c index deac71335c2..c6281cf86d3 100644 --- a/src/backend/tcop/fastpath.c +++ b/src/backend/tcop/fastpath.c @@ -26,7 +26,6 @@ #include "libpq/protocol.h" #include "mb/pg_wchar.h" #include "miscadmin.h" -#include "port/pg_bswap.h" #include "tcop/fastpath.h" #include "tcop/tcopprot.h" #include "utils/acl.h" diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c index 7f5eada9d45..8cc23a9cef8 100644 --- a/src/backend/tcop/postgres.c +++ b/src/backend/tcop/postgres.c @@ -53,7 +53,6 @@ #include "pg_getopt.h" #include "pg_trace.h" #include "pgstat.h" -#include "postmaster/autovacuum.h" #include "postmaster/interrupt.h" #include "postmaster/postmaster.h" #include "replication/logicallauncher.h" diff --git a/src/backend/utils/Gen_fmgrtab.pl b/src/backend/utils/Gen_fmgrtab.pl index 37628a85c73..738828b95c6 100644 --- a/src/backend/utils/Gen_fmgrtab.pl +++ b/src/backend/utils/Gen_fmgrtab.pl @@ -182,7 +182,6 @@ #include "postgres.h" -#include "access/transam.h" #include "utils/fmgrtab.h" #include "utils/fmgrprotos.h" diff --git a/src/backend/utils/activity/backend_progress.c b/src/backend/utils/activity/backend_progress.c index c78c5eb5076..b80249a79e7 100644 --- a/src/backend/utils/activity/backend_progress.c +++ b/src/backend/utils/activity/backend_progress.c @@ -12,7 +12,6 @@ #include "access/parallel.h" #include "libpq/pqformat.h" -#include "port/atomics.h" /* for memory barriers */ #include "utils/backend_progress.h" #include "utils/backend_status.h" diff --git a/src/backend/utils/activity/backend_status.c b/src/backend/utils/activity/backend_status.c index 34a55e2177d..bdb3a296ca6 100644 --- a/src/backend/utils/activity/backend_status.c +++ b/src/backend/utils/activity/backend_status.c @@ -16,11 +16,9 @@ #include "miscadmin.h" #include "pg_trace.h" #include "pgstat.h" -#include "port/atomics.h" /* for memory barriers */ #include "storage/ipc.h" #include "storage/proc.h" /* for MyProc */ #include "storage/procarray.h" -#include "storage/sinvaladt.h" #include "utils/ascii.h" #include "utils/guc.h" /* for application_name */ #include "utils/memutils.h" diff --git a/src/backend/utils/activity/pgstat.c b/src/backend/utils/activity/pgstat.c index d1768a89f6e..be48432cc38 100644 --- a/src/backend/utils/activity/pgstat.c +++ b/src/backend/utils/activity/pgstat.c @@ -105,7 +105,6 @@ #include "access/xlog.h" #include "lib/dshash.h" #include "pgstat.h" -#include "port/atomics.h" #include "storage/fd.h" #include "storage/ipc.h" #include "storage/lwlock.h" diff --git a/src/backend/utils/activity/pgstat_relation.c b/src/backend/utils/activity/pgstat_relation.c index 8a3f7d434cf..36d3adf7310 100644 --- a/src/backend/utils/activity/pgstat_relation.c +++ b/src/backend/utils/activity/pgstat_relation.c @@ -20,7 +20,6 @@ #include "access/twophase_rmgr.h" #include "access/xact.h" #include "catalog/catalog.h" -#include "postmaster/autovacuum.h" #include "utils/memutils.h" #include "utils/pgstat_internal.h" #include "utils/rel.h" diff --git a/src/backend/utils/activity/wait_event.c b/src/backend/utils/activity/wait_event.c index bbf59482be1..d930277140c 100644 --- a/src/backend/utils/activity/wait_event.c +++ b/src/backend/utils/activity/wait_event.c @@ -22,7 +22,6 @@ */ #include "postgres.h" -#include "port/pg_bitutils.h" #include "storage/lmgr.h" /* for GetLockNameFromTagType */ #include "storage/lwlock.h" /* for GetLWLockIdentifier */ #include "storage/spin.h" diff --git a/src/backend/utils/adt/float.c b/src/backend/utils/adt/float.c index 6fa6ffb51f5..f5927bcc564 100644 --- a/src/backend/utils/adt/float.c +++ b/src/backend/utils/adt/float.c @@ -27,7 +27,6 @@ #include "utils/float.h" #include "utils/fmgrprotos.h" #include "utils/sortsupport.h" -#include "utils/timestamp.h" /* diff --git a/src/backend/utils/adt/jsonpath_exec.c b/src/backend/utils/adt/jsonpath_exec.c index 1184cba983a..ac214598037 100644 --- a/src/backend/utils/adt/jsonpath_exec.c +++ b/src/backend/utils/adt/jsonpath_exec.c @@ -61,7 +61,6 @@ #include "catalog/pg_collation.h" #include "catalog/pg_type.h" -#include "executor/execExpr.h" #include "funcapi.h" #include "miscadmin.h" #include "nodes/miscnodes.h" @@ -74,7 +73,6 @@ #include "utils/formatting.h" #include "utils/json.h" #include "utils/jsonpath.h" -#include "utils/lsyscache.h" #include "utils/memutils.h" #include "utils/timestamp.h" diff --git a/src/backend/utils/adt/pg_upgrade_support.c b/src/backend/utils/adt/pg_upgrade_support.c index c54b08fe180..8a45b5827e3 100644 --- a/src/backend/utils/adt/pg_upgrade_support.c +++ b/src/backend/utils/adt/pg_upgrade_support.c @@ -28,7 +28,6 @@ #include "utils/builtins.h" #include "utils/lsyscache.h" #include "utils/pg_lsn.h" -#include "utils/syscache.h" #define CHECK_IS_BINARY_UPGRADE \ diff --git a/src/backend/utils/adt/waitfuncs.c b/src/backend/utils/adt/waitfuncs.c index e135c9e5e45..a083ced251e 100644 --- a/src/backend/utils/adt/waitfuncs.c +++ b/src/backend/utils/adt/waitfuncs.c @@ -17,7 +17,7 @@ #include "storage/proc.h" #include "storage/procarray.h" #include "utils/array.h" -#include "utils/builtins.h" +#include "utils/fmgrprotos.h" #include "utils/wait_event.h" #define UINT32_ACCESS_ONCE(var) ((uint32)(*((volatile uint32 *)&(var)))) diff --git a/src/backend/utils/hash/pg_crc.c b/src/backend/utils/hash/pg_crc.c index a85e6171864..2fc85405b63 100644 --- a/src/backend/utils/hash/pg_crc.c +++ b/src/backend/utils/hash/pg_crc.c @@ -20,7 +20,7 @@ #include "postgres.h" #include "port/pg_crc32c.h" -#include "utils/builtins.h" +#include "utils/fmgrprotos.h" #include "utils/pg_crc.h" #include "varatt.h" diff --git a/src/backend/utils/misc/injection_point.c b/src/backend/utils/misc/injection_point.c index 7c1a7cf889d..deb7d245ef8 100644 --- a/src/backend/utils/misc/injection_point.c +++ b/src/backend/utils/misc/injection_point.c @@ -17,6 +17,10 @@ */ #include "postgres.h" +#include "utils/injection_point.h" + +#ifdef USE_INJECTION_POINTS + #include #include "fmgr.h" @@ -25,11 +29,8 @@ #include "storage/lwlock.h" #include "storage/shmem.h" #include "utils/hsearch.h" -#include "utils/injection_point.h" #include "utils/memutils.h" -#ifdef USE_INJECTION_POINTS - /* Field sizes */ #define INJ_NAME_MAXLEN 64 #define INJ_LIB_MAXLEN 128 diff --git a/src/backend/utils/misc/pg_config.c b/src/backend/utils/misc/pg_config.c index 2af47e1244f..89dd18355ae 100644 --- a/src/backend/utils/misc/pg_config.c +++ b/src/backend/utils/misc/pg_config.c @@ -17,7 +17,6 @@ #include "common/config_info.h" #include "funcapi.h" #include "miscadmin.h" -#include "port.h" #include "utils/builtins.h" Datum base-commit: 11c87216d134a606938531e52edab6189bce6c2d -- 2.47.0