Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0944ec5

Browse files
committed
Don't include genam.h from execnodes.h and relscan.h anymore.
This is the genam.h equivalent of4c850ec (which removedheapam.h from a lot of other headers). There's still a few headerincludes of genam.h, but not from central headers anymore.As a few headers are not indirectly included anymore, execnodes.h andrelscan.h need a few additional includes. Some of the depended ontypes were replacable by using the underlying structs, but e.g. forSnapshot in execnodes.h that'd have gotten more invasive thanreasonable in this commit.Like the aforementioned commit4c850ec, this requires adding newgenam.h includes to a number of backend files, which likely is alsorequired in a few external projects.Author: Andres FreundDiscussion:https://postgr.es/m/20190114000701.y4ttcb74jpskkcfb@alap3.anarazel.de
1 parent774a975 commit0944ec5

File tree

22 files changed

+45
-23
lines changed

22 files changed

+45
-23
lines changed

‎src/backend/access/heap/heapam.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
#include"postgres.h"
4040

4141
#include"access/bufmask.h"
42+
#include"access/genam.h"
4243
#include"access/heapam.h"
4344
#include"access/heapam_xlog.h"
4445
#include"access/hio.h"

‎src/backend/access/index/genam.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
#include"postgres.h"
2121

22+
#include"access/genam.h"
2223
#include"access/heapam.h"
2324
#include"access/relscan.h"
2425
#include"access/transam.h"

‎src/backend/bootstrap/bootstrap.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#include<unistd.h>
1818
#include<signal.h>
1919

20+
#include"access/genam.h"
2021
#include"access/heapam.h"
2122
#include"access/htup_details.h"
2223
#include"access/xact.h"

‎src/backend/catalog/dependency.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
*/
1515
#include"postgres.h"
1616

17+
#include"access/genam.h"
1718
#include"access/htup_details.h"
1819
#include"access/heapam.h"
1920
#include"access/xact.h"

‎src/backend/catalog/heap.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
*/
3030
#include"postgres.h"
3131

32+
#include"access/genam.h"
3233
#include"access/heapam.h"
3334
#include"access/htup_details.h"
3435
#include"access/multixact.h"

‎src/backend/catalog/indexing.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
*/
1616
#include"postgres.h"
1717

18+
#include"access/genam.h"
1819
#include"access/heapam.h"
1920
#include"access/htup_details.h"
2021
#include"catalog/index.h"

‎src/backend/catalog/objectaddress.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
#include"postgres.h"
1717

18+
#include"access/genam.h"
1819
#include"access/heapam.h"
1920
#include"access/htup_details.h"
2021
#include"access/sysattr.h"

‎src/backend/commands/analyze.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
#include<math.h>
1818

19+
#include"access/genam.h"
1920
#include"access/heapam.h"
2021
#include"access/multixact.h"
2122
#include"access/sysattr.h"

‎src/backend/commands/constraint.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
*/
1414
#include"postgres.h"
1515

16+
#include"access/genam.h"
1617
#include"access/heapam.h"
1718
#include"catalog/index.h"
1819
#include"commands/trigger.h"

‎src/backend/commands/extension.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
#include<sys/stat.h>
3030
#include<unistd.h>
3131

32+
#include"access/genam.h"
3233
#include"access/heapam.h"
3334
#include"access/htup_details.h"
3435
#include"access/sysattr.h"

‎src/backend/commands/matview.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
*/
1515
#include"postgres.h"
1616

17+
#include"access/genam.h"
1718
#include"access/heapam.h"
1819
#include"access/htup_details.h"
1920
#include"access/multixact.h"

‎src/backend/commands/typecmds.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
*/
3232
#include"postgres.h"
3333

34+
#include"access/genam.h"
3435
#include"access/heapam.h"
3536
#include"access/htup_details.h"
3637
#include"access/xact.h"

‎src/backend/executor/execCurrent.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
*/
1313
#include"postgres.h"
1414

15+
#include"access/genam.h"
1516
#include"access/relscan.h"
1617
#include"access/sysattr.h"
1718
#include"catalog/pg_type.h"

‎src/backend/executor/execIndexing.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@
106106
*/
107107
#include"postgres.h"
108108

109+
#include"access/genam.h"
109110
#include"access/relscan.h"
110111
#include"access/xact.h"
111112
#include"catalog/index.h"

‎src/backend/executor/execReplication.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
#include"postgres.h"
1616

17+
#include"access/genam.h"
1718
#include"access/heapam.h"
1819
#include"access/relscan.h"
1920
#include"access/transam.h"

‎src/backend/executor/nodeBitmapIndexscan.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
*/
2222
#include"postgres.h"
2323

24+
#include"access/genam.h"
2425
#include"executor/execdebug.h"
2526
#include"executor/nodeBitmapIndexscan.h"
2627
#include"executor/nodeIndexscan.h"

‎src/backend/executor/nodeIndexonlyscan.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@
3030
*/
3131
#include"postgres.h"
3232

33+
#include"access/genam.h"
3334
#include"access/relscan.h"
35+
#include"access/tupdesc.h"
3436
#include"access/visibilitymap.h"
3537
#include"executor/execdebug.h"
3638
#include"executor/nodeIndexonlyscan.h"

‎src/backend/optimizer/plan/planner.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#include<limits.h>
1919
#include<math.h>
2020

21+
#include"access/genam.h"
2122
#include"access/heapam.h"
2223
#include"access/htup_details.h"
2324
#include"access/parallel.h"

‎src/backend/utils/init/postinit.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#include<fcntl.h>
2020
#include<unistd.h>
2121

22+
#include"access/genam.h"
2223
#include"access/heapam.h"
2324
#include"access/htup_details.h"
2425
#include"access/session.h"

‎src/include/access/relscan.h

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,12 @@
1414
#ifndefRELSCAN_H
1515
#defineRELSCAN_H
1616

17-
#include"access/genam.h"
1817
#include"access/htup_details.h"
1918
#include"access/itup.h"
20-
#include"access/tupdesc.h"
19+
#include"port/atomics.h"
20+
#include"storage/buf.h"
2121
#include"storage/spin.h"
22+
#include"utils/relcache.h"
2223

2324
/*
2425
* Shared state for parallel heap scan.
@@ -46,9 +47,9 @@ typedef struct HeapScanDescData
4647
{
4748
/* scan parameters */
4849
Relationrs_rd;/* heap relation descriptor */
49-
Snapshotrs_snapshot;/* snapshot to see */
50+
structSnapshotData*rs_snapshot;/* snapshot to see */
5051
intrs_nkeys;/* number of scan keys */
51-
ScanKeyrs_key;/* array of scan key descriptors */
52+
structScanKeyData*rs_key;/* array of scan key descriptors */
5253
boolrs_bitmapscan;/* true if this is really a bitmap scan */
5354
boolrs_samplescan;/* true if this is really a sample scan */
5455
boolrs_pageatatime;/* verify visibility page-at-a-time? */
@@ -88,11 +89,11 @@ typedef struct IndexScanDescData
8889
/* scan parameters */
8990
RelationheapRelation;/* heap relation descriptor, or NULL */
9091
RelationindexRelation;/* index relation descriptor */
91-
Snapshotxs_snapshot;/* snapshot to see */
92+
structSnapshotData*xs_snapshot;/* snapshot to see */
9293
intnumberOfKeys;/* number of index qualifier conditions */
9394
intnumberOfOrderBys;/* number of ordering operators */
94-
ScanKeykeyData;/* array of index qualifier descriptors */
95-
ScanKeyorderByData;/* array of ordering op descriptors */
95+
structScanKeyData*keyData;/* array of index qualifier descriptors */
96+
structScanKeyData*orderByData;/* array of ordering op descriptors */
9697
boolxs_want_itup;/* caller requests index tuples */
9798
boolxs_temp_snap;/* unregister snapshot at scan end? */
9899

@@ -112,9 +113,9 @@ typedef struct IndexScanDescData
112113
* format will be used.
113114
*/
114115
IndexTuplexs_itup;/* index tuple returned by AM */
115-
TupleDescxs_itupdesc;/* rowtype descriptor of xs_itup */
116+
structTupleDescData*xs_itupdesc;/* rowtype descriptor of xs_itup */
116117
HeapTuplexs_hitup;/* index data returned by AM, as HeapTuple */
117-
TupleDescxs_hitupdesc;/* rowtype descriptor of xs_hitup */
118+
structTupleDescData*xs_hitupdesc;/* rowtype descriptor of xs_hitup */
118119

119120
/* xs_ctup/xs_cbuf/xs_recheck are valid after a successful index_getnext */
120121
HeapTupleDataxs_ctup;/* current heap tuple, if any */
@@ -137,7 +138,7 @@ typedef struct IndexScanDescData
137138
boolxs_continue_hot;/* T if must keep walking HOT chain */
138139

139140
/* parallel index scan information, in shared memory */
140-
ParallelIndexScanDescparallel_scan;
141+
structParallelIndexScanDescData*parallel_scan;
141142
}IndexScanDescData;
142143

143144
/* Generic structure for parallel scans */
@@ -155,8 +156,8 @@ typedef struct SysScanDescData
155156
Relationheap_rel;/* catalog being scanned */
156157
Relationirel;/* NULL if doing heap scan */
157158
structHeapScanDescData*scan;/* only valid in heap-scan case */
158-
IndexScanDesciscan;/* only valid in index-scan case */
159-
Snapshotsnapshot;/* snapshot to unregister at end of scan */
159+
structIndexScanDescData*iscan;/* only valid in index-scan case */
160+
structSnapshotData*snapshot;/* snapshot to unregister at end of scan */
160161
}SysScanDescData;
161162

162163
#endif/* RELSCAN_H */

‎src/include/executor/nodeIndexscan.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#ifndefNODEINDEXSCAN_H
1515
#defineNODEINDEXSCAN_H
1616

17+
#include"access/genam.h"
1718
#include"access/parallel.h"
1819
#include"nodes/execnodes.h"
1920

‎src/include/nodes/execnodes.h

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
#ifndefEXECNODES_H
1515
#defineEXECNODES_H
1616

17-
#include"access/genam.h"
1817
#include"access/tupconvert.h"
1918
#include"executor/instrument.h"
2019
#include"lib/pairingheap.h"
@@ -24,6 +23,7 @@
2423
#include"utils/queryenvironment.h"
2524
#include"utils/reltrigger.h"
2625
#include"utils/sharedtuplestore.h"
26+
#include"utils/snapshot.h"
2727
#include"utils/sortsupport.h"
2828
#include"utils/tuplestore.h"
2929
#include"utils/tuplesort.h"
@@ -1306,14 +1306,14 @@ typedef struct SampleScanState
13061306
*/
13071307
typedefstruct
13081308
{
1309-
ScanKeyscan_key;/* scankey to put value into */
1309+
structScanKeyData*scan_key;/* scankey to put value into */
13101310
ExprState*key_expr;/* expr to evaluate to get value */
13111311
boolkey_toastable;/* is expr's result a toastable datatype? */
13121312
}IndexRuntimeKeyInfo;
13131313

13141314
typedefstruct
13151315
{
1316-
ScanKeyscan_key;/* scankey to put value into */
1316+
structScanKeyData*scan_key;/* scankey to put value into */
13171317
ExprState*array_expr;/* expr to evaluate to get array value */
13181318
intnext_elem;/* next array element to use */
13191319
intnum_elems;/* number of elems in current array value */
@@ -1352,16 +1352,16 @@ typedef struct IndexScanState
13521352
ScanStatess;/* its first field is NodeTag */
13531353
ExprState*indexqualorig;
13541354
List*indexorderbyorig;
1355-
ScanKeyiss_ScanKeys;
1355+
structScanKeyData*iss_ScanKeys;
13561356
intiss_NumScanKeys;
1357-
ScanKeyiss_OrderByKeys;
1357+
structScanKeyData*iss_OrderByKeys;
13581358
intiss_NumOrderByKeys;
13591359
IndexRuntimeKeyInfo*iss_RuntimeKeys;
13601360
intiss_NumRuntimeKeys;
13611361
booliss_RuntimeKeysReady;
13621362
ExprContext*iss_RuntimeContext;
13631363
Relationiss_RelationDesc;
1364-
IndexScanDesciss_ScanDesc;
1364+
structIndexScanDescData*iss_ScanDesc;
13651365

13661366
/* These are needed for re-checking ORDER BY expr ordering */
13671367
pairingheap*iss_ReorderQueue;
@@ -1397,16 +1397,16 @@ typedef struct IndexOnlyScanState
13971397
{
13981398
ScanStatess;/* its first field is NodeTag */
13991399
ExprState*indexqual;
1400-
ScanKeyioss_ScanKeys;
1400+
structScanKeyData*ioss_ScanKeys;
14011401
intioss_NumScanKeys;
1402-
ScanKeyioss_OrderByKeys;
1402+
structScanKeyData*ioss_OrderByKeys;
14031403
intioss_NumOrderByKeys;
14041404
IndexRuntimeKeyInfo*ioss_RuntimeKeys;
14051405
intioss_NumRuntimeKeys;
14061406
boolioss_RuntimeKeysReady;
14071407
ExprContext*ioss_RuntimeContext;
14081408
Relationioss_RelationDesc;
1409-
IndexScanDescioss_ScanDesc;
1409+
structIndexScanDescData*ioss_ScanDesc;
14101410
Bufferioss_VMBuffer;
14111411
Sizeioss_PscanLen;
14121412
}IndexOnlyScanState;
@@ -1431,7 +1431,7 @@ typedef struct BitmapIndexScanState
14311431
{
14321432
ScanStatess;/* its first field is NodeTag */
14331433
TIDBitmap*biss_result;
1434-
ScanKeybiss_ScanKeys;
1434+
structScanKeyData*biss_ScanKeys;
14351435
intbiss_NumScanKeys;
14361436
IndexRuntimeKeyInfo*biss_RuntimeKeys;
14371437
intbiss_NumRuntimeKeys;
@@ -1440,7 +1440,7 @@ typedef struct BitmapIndexScanState
14401440
boolbiss_RuntimeKeysReady;
14411441
ExprContext*biss_RuntimeContext;
14421442
Relationbiss_RelationDesc;
1443-
IndexScanDescbiss_ScanDesc;
1443+
structIndexScanDescData*biss_ScanDesc;
14441444
}BitmapIndexScanState;
14451445

14461446
/* ----------------

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp