mirror of
https://github.com/postgres/postgres.git
synced 2025-11-10 17:42:29 +03:00
Make the order of the header file includes consistent in backend modules.
Similar to commits7e735035f2anddddf4cdc33, this commit makes the order of header file inclusion consistent for backend modules. In the passing, removed a couple of duplicate inclusions. Author: Vignesh C Reviewed-by: Kuntal Ghosh and Amit Kapila Discussion: https://postgr.es/m/CALDaNm2Sznv8RR6Ex-iJO6xAdsxgWhCoETkaYX=+9DW3q0QCfA@mail.gmail.com
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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"
|
||||
|
||||
/*
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user