Skip to content

Commit 9d8590c

Browse files
committed
remove redundant includes
1 parent 7dc0118 commit 9d8590c

File tree

11 files changed

+11
-29
lines changed

11 files changed

+11
-29
lines changed

src/dsm_array.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
#include "pathman.h"
1313
#include "storage/shmem.h"
1414
#include "storage/dsm.h"
15-
#include "storage/lwlock.h"
16-
#include <stdint.h>
1715

1816

1917
static dsm_segment *segment = NULL;
@@ -95,7 +93,7 @@ init_dsm_segment(size_t blocks_count, size_t block_size)
9593
ret = false;
9694
segment = dsm_attach(dsm_cfg->segment_handle);
9795
}
98-
96+
9997
/*
10098
* If segment hasn't been created yet or has already been destroyed
10199
* (it happens when last session detaches segment) then create new one

src/hooks.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
#include "postgres.h"
1111
#include "optimizer/cost.h"
1212
#include "optimizer/restrictinfo.h"
13-
#include "utils/guc.h"
1413
#include "pathman.h"
1514
#include "hooks.h"
1615
#include "partition_filter.h"

src/init.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,12 @@
1111
#include "miscadmin.h"
1212
#include "executor/spi.h"
1313
#include "catalog/pg_type.h"
14-
#include "catalog/pg_class.h"
1514
#include "catalog/pg_constraint.h"
16-
#include "catalog/pg_operator.h"
1715
#include "access/htup_details.h"
1816
#include "utils/syscache.h"
1917
#include "utils/builtins.h"
2018
#include "utils/typcache.h"
2119
#include "utils/lsyscache.h"
22-
#include "utils/bytea.h"
2320
#include "utils/snapmgr.h"
2421
#include "optimizer/clauses.h"
2522

src/nodes_common.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
* ------------------------------------------------------------------------
99
*/
1010
#include "postgres.h"
11-
#include "optimizer/paths.h"
1211
#include "nodes_common.h"
1312
#include "runtimeappend.h"
1413
#include "optimizer/restrictinfo.h"

src/partition_filter.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#include "partition_filter.h"
22
#include "utils.h"
33
#include "utils/guc.h"
4-
#include "utils/lsyscache.h"
54
#include "nodes/nodeFuncs.h"
65

76

src/partition_filter.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
#define RUNTIME_INSERT_H
33

44
#include "postgres.h"
5-
#include "optimizer/paths.h"
6-
#include "optimizer/pathnode.h"
75

86
#include "pathman.h"
97
#include "nodes_common.h"

src/pathman.h

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,12 @@ alloc_irange(IndexRange irange)
180180
#define llast_irange(list) ( lfirst_irange(list_tail(list)) )
181181
#define linitial_irange(list) ( lfirst_irange(list_head(list)) )
182182

183+
184+
extern HTAB *relations;
185+
extern HTAB *range_restrictions;
186+
extern bool initialization_needed;
187+
188+
183189
/* rangeset.c */
184190
bool irange_intersects(IndexRange a, IndexRange b);
185191
bool irange_conjuncted(IndexRange a, IndexRange b);
@@ -202,10 +208,6 @@ void *dsm_array_get_pointer(const DsmArray* arr);
202208
dsm_handle get_dsm_array_segment(void);
203209
void attach_dsm_array_segment(void);
204210

205-
HTAB *relations;
206-
HTAB *range_restrictions;
207-
bool initialization_needed;
208-
209211
/* initialization functions */
210212
Size pathman_memsize(void);
211213
void init_shmem_config(void);

src/pg_pathman.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,15 @@
2525
#include "optimizer/cost.h"
2626
#include "parser/analyze.h"
2727
#include "utils/hsearch.h"
28-
#include "utils/tqual.h"
2928
#include "utils/rel.h"
3029
#include "utils/elog.h"
3130
#include "utils/array.h"
32-
#include "utils/date.h"
3331
#include "utils/guc.h"
3432
#include "utils/lsyscache.h"
3533
#include "utils/selfuncs.h"
3634
#include "access/heapam.h"
3735
#include "access/nbtree.h"
3836
#include "storage/ipc.h"
39-
#include "catalog/pg_operator.h"
4037
#include "catalog/pg_type.h"
4138
#include "foreign/fdwapi.h"
4239
#include "hooks.h"
@@ -47,16 +44,19 @@
4744

4845
PG_MODULE_MAGIC;
4946

47+
5048
typedef struct
5149
{
5250
Oid old_varno;
5351
Oid new_varno;
5452
} change_varno_context;
5553

54+
5655
bool inheritance_disabled;
5756
bool pg_pathman_enable;
5857
PathmanState *pmstate;
5958

59+
6060
/* pg module functions */
6161
void _PG_init(void);
6262

src/pl_funcs.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,10 @@
88
* ------------------------------------------------------------------------
99
*/
1010
#include "pathman.h"
11+
#include "access/nbtree.h"
1112
#include "utils/lsyscache.h"
1213
#include "utils/typcache.h"
1314
#include "utils/array.h"
14-
#include "utils/snapmgr.h"
15-
#include "access/nbtree.h"
16-
#include "access/xact.h"
17-
#include "catalog/pg_type.h"
18-
#include "executor/spi.h"
19-
#include "storage/lmgr.h"
2015
#include "utils.h"
2116

2217

src/runtime_merge_append.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@
1212

1313
#include "pathman.h"
1414

15-
#include "optimizer/clauses.h"
1615
#include "optimizer/cost.h"
17-
#include "optimizer/restrictinfo.h"
1816
#include "optimizer/planmain.h"
1917
#include "optimizer/tlist.h"
2018
#include "optimizer/var.h"

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy