Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
439a2af0
Commit
439a2af0
authored
Aug 03, 1998
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update mark/reset index code for multiple indexes, (OR code).
Thanks for Vadim for fixes.
parent
21ad8695
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
101 additions
and
108 deletions
+101
-108
src/backend/executor/nodeIndexscan.c
src/backend/executor/nodeIndexscan.c
+33
-37
src/include/nodes/execnodes.h
src/include/nodes/execnodes.h
+2
-1
src/tools/backend/flow.fig
src/tools/backend/flow.fig
+60
-62
src/tools/backend/flow.jpg
src/tools/backend/flow.jpg
+0
-0
src/tools/backend/index.html
src/tools/backend/index.html
+6
-8
No files found.
src/backend/executor/nodeIndexscan.c
View file @
439a2af0
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/nodeIndexscan.c,v 1.2
1 1998/08/01 22:44:52
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/executor/nodeIndexscan.c,v 1.2
2 1998/08/03 19:41:29
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -258,9 +258,8 @@ ExecIndexReScan(IndexScan *node, ExprContext *exprCtxt, Plan *parent)
if
(
exprCtxt
==
NULL
)
exprCtxt
=
node
->
scan
.
scanstate
->
cstate
.
cs_ExprContext
;
if
(
exprCtxt
!=
NULL
)
node
->
scan
.
scanstate
->
cstate
.
cs_ExprContext
->
ecxt_outertuple
=
exprCtxt
->
ecxt_outertuple
;
node
->
scan
.
scanstate
->
cstate
.
cs_ExprContext
->
ecxt_outertuple
=
exprCtxt
->
ecxt_outertuple
;
/*
* get the index qualifications and recalculate the appropriate
...
...
@@ -268,43 +267,40 @@ ExecIndexReScan(IndexScan *node, ExprContext *exprCtxt, Plan *parent)
*/
for
(
i
=
0
;
i
<
numIndices
;
i
++
)
{
if
(
runtimeKeyInfo
&&
runtimeKeyInfo
[
i
]
!=
NULL
)
qual
=
nth
(
i
,
indxqual
);
n_keys
=
numScanKeys
[
i
];
run_keys
=
(
int
*
)
runtimeKeyInfo
[
i
];
scan_keys
=
(
ScanKey
)
scanKeys
[
i
];
for
(
j
=
0
;
j
<
n_keys
;
j
++
)
{
qual
=
nth
(
i
,
indxqual
);
n_keys
=
numScanKeys
[
i
];
run_keys
=
(
int
*
)
runtimeKeyInfo
[
i
];
scan_keys
=
(
ScanKey
)
scanKeys
[
i
];
for
(
j
=
0
;
j
<
n_keys
;
j
++
)
/*
* If we have a run-time key, then extract the run-time
* expression and evaluate it with respect to the current
* outer tuple. We then stick the result into the scan key.
*/
if
(
run_keys
[
j
]
!=
NO_OP
)
{
clause
=
nth
(
j
,
qual
);
scanexpr
=
(
run_keys
[
j
]
==
RIGHT_OP
)
?
(
Node
*
)
get_rightop
(
clause
)
:
(
Node
*
)
get_leftop
(
clause
);
/*
* If we have a run-time key, then extract the run-time
* expression and evaluate it with respect to the current
* outer tuple. We then stick the result into the scan key.
* pass in isDone but ignore it. We don't iterate in
* quals
*/
if
(
run_keys
[
j
]
!=
NO_OP
)
{
clause
=
nth
(
j
,
qual
);
scanexpr
=
(
run_keys
[
j
]
==
RIGHT_OP
)
?
(
Node
*
)
get_rightop
(
clause
)
:
(
Node
*
)
get_leftop
(
clause
);
/*
* pass in isDone but ignore it. We don't iterate in
* quals
*/
scanvalue
=
(
Datum
)
ExecEvalExpr
(
scanexpr
,
exprCtxt
,
&
isNull
,
&
isDone
);
scan_keys
[
j
].
sk_argument
=
scanvalue
;
if
(
isNull
)
scan_keys
[
j
].
sk_flags
|=
SK_ISNULL
;
else
scan_keys
[
j
].
sk_flags
&=
~
SK_ISNULL
;
}
scanvalue
=
(
Datum
)
ExecEvalExpr
(
scanexpr
,
exprCtxt
,
&
isNull
,
&
isDone
);
scan_keys
[
j
].
sk_argument
=
scanvalue
;
if
(
isNull
)
scan_keys
[
j
].
sk_flags
|=
SK_ISNULL
;
else
scan_keys
[
j
].
sk_flags
&=
~
SK_ISNULL
;
}
sdesc
=
scanDescs
[
i
];
skey
=
scanKeys
[
i
];
index_rescan
(
sdesc
,
direction
,
skey
);
}
sdesc
=
scanDescs
[
i
];
skey
=
scanKeys
[
i
];
index_rescan
(
sdesc
,
direction
,
skey
);
}
/* ----------------
* perhaps return something meaningful
...
...
@@ -416,7 +412,7 @@ ExecIndexMarkPos(IndexScan *node)
int
indexPtr
;
indexstate
=
node
->
indxstate
;
indexPtr
=
indexstate
->
iss_IndexPtr
;
indexPtr
=
indexstate
->
iss_
MarkIndexPtr
=
indexstate
->
iss_
IndexPtr
;
indexScanDescs
=
indexstate
->
iss_ScanDescs
;
scanDesc
=
indexScanDescs
[
indexPtr
];
...
...
@@ -445,7 +441,7 @@ ExecIndexRestrPos(IndexScan *node)
int
indexPtr
;
indexstate
=
node
->
indxstate
;
indexPtr
=
indexstate
->
iss_IndexPtr
;
indexPtr
=
indexstate
->
iss_IndexPtr
=
indexstate
->
iss_MarkIndexPtr
;
indexScanDescs
=
indexstate
->
iss_ScanDescs
;
scanDesc
=
indexScanDescs
[
indexPtr
];
...
...
src/include/nodes/execnodes.h
View file @
439a2af0
...
...
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: execnodes.h,v 1.1
6 1998/07/27 19:38:34 vadim
Exp $
* $Id: execnodes.h,v 1.1
7 1998/08/03 19:41:31 momjian
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -399,6 +399,7 @@ typedef struct IndexScanState
CommonState
cstate
;
/* its first field is NodeTag */
int
iss_NumIndices
;
int
iss_IndexPtr
;
int
iss_MarkIndexPtr
;
ScanKey
*
iss_ScanKeys
;
int
*
iss_NumScanKeys
;
Pointer
iss_RuntimeKeyInfo
;
...
...
src/tools/backend/flow.fig
View file @
439a2af0
...
...
@@ -8,85 +8,63 @@ Inches
4 0 -1 0 0 0 24 0.0000 4 330 1800 450 675 PostgreSQL\001
4 0 -1 0 0 0 24 0.0000 4 330 1290 450 1095 Program\001
-6
6 5325 13125 7725 14400
2 4 0 1 -1 29 0 0 20 0.000 0 0 7 0 0 5
7725 14400 5325 14400 5325 13800 7725 13800 7725 14400
2 1 0 1 29 7 0 0 -1 0.000 0 0 -1 1 1 2
0 0 1.00 60.00 120.00
0 0 1.00 60.00 120.00
6450 13200 6450 13800
-6
2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 0 0 1
8475 2175
2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 0 0 1
8475 2175
2 4 0 1 -1 29 0 0 20 0.000 0 0 7 0 0 5
2850 13200 450 13200 450 12600 2850 12600 2850 13200
2 1 0
1
29 7 0 0 -1 0.000 0 0 -1 1 1 2
0 0
1.00 60.00 12
0.00
0 0
1.00 60.00 12
0.00
2 1 0
2
29 7 0 0 -1 0.000 0 0 -1 1 1 2
0 0
2.00 150.00 18
0.00
0 0
2.00 150.00 18
0.00
1650 12600 1650 12000
2 4 0 1 -1 29 0 0 20 0.000 0 0 7 0 0 5
9225 13200 6825 13200 6825 12600 9225 12600 9225 13200
2 1 0
1
29 7 0 0 -1 0.000 0 0 -1 1 1 2
0 0
1.00 60.00 12
0.00
0 0
1.00 60.00 12
0.00
2 1 0
2
29 7 0 0 -1 0.000 0 0 -1 1 1 2
0 0
2.00 150.00 18
0.00
0 0
2.00 150.00 18
0.00
8025 11925 8025 12525
2 4 0 1 -1 29 0 0 20 0.000 0 0 7 0 0 5
6000 13200 3600 13200 3600 12600 6000 12600 6000 13200
2 1 0
1
29 7 0 0 -1 0.000 0 0 -1 1 1 2
0 0
1.00 60.00 12
0.00
0 0
1.00 60.00 12
0.00
2 1 0
2
29 7 0 0 -1 0.000 0 0 -1 1 1 2
0 0
2.00 150.00 18
0.00
0 0
2.00 150.00 18
0.00
4800 12600 4800 12000
2 4 0 1 -1 29 0 0 20 0.000 0 0 7 0 0 5
4425 14400 2025 14400 2025 13800 4425 13800 4425 14400
2 1 0
1
29 7 0 0 -1 0.000 0 0 -1 1 1 2
0 0
1.00 60.00 12
0.00
0 0
1.00 60.00 12
0.00
2 1 0
2
29 7 0 0 -1 0.000 0 0 -1 1 1 2
0 0
2.00 150.00 18
0.00
0 0
2.00 150.00 18
0.00
3225 13200 3225 13800
2 1 0
1
8 7 0 0 -1 0.000 0 0 -1 1 0 2
0 0
1.00 60.00 12
0.00
2 1 0
2
8 7 0 0 -1 0.000 0 0 -1 1 0 2
0 0
2.00 150.00 18
0.00
2625 6675 2625 7275
2 1 0 1 19 7 0 0 -1 0.000 0 0 -1 1 0 2
0 0 1.00 60.00 120.00
2625 2775 2625 3375
2 4 0 1 -1 4 0 0 20 0.000 0 0 7 0 0 5
3825 3975 1425 3975 1425 3375 3825 3375 3825 3975
2 1 0 1 20 7 0 0 -1 0.000 0 0 -1 1 0 2
0 0 1.00 60.00 120.00
2625 3975 2625 4575
2 1 0 1 20 7 0 0 -1 0.000 0 0 -1 1 0 2
0 0 1.00 60.00 120.00
2625 3975 6525 4575
2 4 0 1 -1 8 0 0 20 0.000 0 0 7 0 0 5
3825 6675 1425 6675 1425 6075 3825 6075 3825 6675
2 4 0 1 -1 8 0 0 20 0.000 0 0 7 0 0 5
3825 7875 1425 7875 1425 7275 3825 7275 3825 7875
2 4 0 1 -1 8 0 0 20 0.000 0 0 7 0 0 5
3825 9075 1425 9075 1425 8475 3825 8475 3825 9075
2 1 0
1
8 7 0 0 -1 0.000 0 0 -1 1 0 2
0 0
1.00 60.00 12
0.00
2 1 0
2
8 7 0 0 -1 0.000 0 0 -1 1 0 2
0 0
2.00 150.00 18
0.00
2625 7875 2625 8475
2 4 0 1 -1 8 0 0 20 0.000 0 0 7 0 0 5
3825 10275 1425 10275 1425 9675 3825 9675 3825 10275
2 1 0
1
8 7 0 0 -1 0.000 0 0 -1 1 0 2
0 0
1.00 60.00 12
0.00
2 1 0
2
8 7 0 0 -1 0.000 0 0 -1 1 0 2
0 0
2.00 150.00 18
0.00
2625 9075 2625 9675
2 1 0
1
8 7 0 0 -1 0.000 0 0 -1 1 0 2
0 0
1.00 60.00 12
0.00
2 1 0
2
8 7 0 0 -1 0.000 0 0 -1 1 0 2
0 0
2.00 150.00 18
0.00
2625 10275 2625 10875
2 4 0 1 -1 8 0 0 20 0.000 0 0 7 0 0 5
7725 7875 5325 7875 5325 7275 7725 7275 7725 7875
2 1 0 1 8 7 0 0 -1 0.000 0 0 -1 1 0 2
0 0 1.00 60.00 120.00
3825 7575 5325 7575
2 1 0 1 8 7 0 0 -1 0.000 0 0 -1 1 0 2
0 0 1.00 60.00 120.00
2 1 0 2 8 7 0 0 -1 0.000 0 0 -1 1 0 2
0 0 2.00 150.00 180.00
2625 5775 2625 6075
2 4 0 1 -1 8 0 0 20 0.000 0 0 7 0 0 5
3825 11475 1425 11475 1425 10875 3825 10875 3825 11475
2 1 0
1
31 7 0 0 -1 0.000 0 0 -1 1 0 2
0 0
1.00 60.00 12
0.00
2 1 0
2
31 7 0 0 -1 0.000 0 0 -1 1 0 2
0 0
2.00 150.00 18
0.00
2625 5175 2625 5775
2 4 0 1 -1 31 0 0 20 0.000 0 0 7 0 0 5
3825 5175 1425 5175 1425 4575 3825 4575 3825 5175
...
...
@@ -96,24 +74,44 @@ Inches
8775 11775 375 11775 375 5625 8775 5625 8775 11775
2 4 0 1 -1 0 0 0 20 0.000 0 0 7 0 0 5
7725 3375 5325 3375 5325 2775 7725 2775 7725 3375
2 1 1 1 -1 7 0 0 -1 3.000 0 0 -1 1 1 2
0 0 1.00 60.00 120.00
0 0 1.00 60.00 120.00
4660 3324 5295 3093
2 1 1 1 -1 7 0 0 -1 4.000 0 0 -1 1 1 2
0 0 1.00 60.00 120.00
0 0 1.00 60.00 120.00
4890 3708 5325 3150
2 4 0 1 -1 26 0 0 20 0.000 0 0 7 0 0 5
3825 2775 1425 2775 1425 2175 3825 2175 3825 2775
2 4 0 1 -1 23 0 0 20 0.000 0 0 8 0 0 5
2925 15675 525 15675 525 15075 2925 15075 2925 15675
3 0 0 1 8 7 0 0 -1 0.000 0 1 0 5
0 0 1.00 60.00 120.00
7725 7575 8325 7275 8325 6375 7950 5775 2625 5775
3 0 0 1 8 7 0 0 -1 0.000 0 1 0 5
0 0 1.00 60.00 120.00
1425 11175 750 10725 750 6225 1425 5775 2625 5775
2 1 0 2 25 7 0 0 -1 0.000 0 0 -1 1 0 2
0 0 2.00 150.00 180.50
2625 2775 2625 3375
2 4 0 1 -1 26 0 0 20 0.000 0 0 7 0 0 5
3825 2775 1425 2775 1425 2175 3825 2175 3825 2775
2 1 0 2 20 7 0 0 -1 0.000 0 0 -1 1 0 2
0 0 2.00 150.00 180.00
2625 3975 2625 4575
2 1 0 2 20 7 0 0 -1 0.000 0 0 -1 1 0 2
0 0 2.00 150.00 180.00
2625 3975 6525 4575
2 1 1 2 -1 7 0 0 -1 4.000 0 0 -1 1 1 2
0 0 2.00 150.00 180.00
0 0 2.00 150.00 180.00
4890 3708 5325 3150
2 4 0 1 -1 29 0 0 20 0.000 0 0 7 0 0 5
7725 14400 5325 14400 5325 13800 7725 13800 7725 14400
2 1 0 2 29 7 0 0 -1 0.000 0 0 -1 1 1 2
0 0 2.00 150.00 180.00
0 0 2.00 150.00 180.00
6450 13200 6450 13800
2 1 0 2 8 7 0 0 -1 0.000 0 0 -1 1 0 2
0 0 2.00 150.00 180.00
3825 7575 5325 7575
2 4 0 1 -1 8 0 0 20 0.000 0 0 7 0 0 5
3825 7875 1425 7875 1425 7275 3825 7275 3825 7875
2 1 1 2 -1 7 0 0 -1 3.000 0 0 -1 1 1 2
0 0 2.00 150.00 180.00
0 0 2.00 150.00 180.00
4735 3324 5370 3093
3 0 0 2 8 7 0 0 -1 0.000 0 1 0 5
0 0 2.00 150.00 180.00
7725 7575 8325 7275 8325 6375 7800 5775 2625 5775
3 0 0 2 8 7 0 0 -1 0.000 0 1 0 5
0 0 2.00 150.00 180.00
1425 11175 825 10725 825 6225 1575 5775 2625 5775
4 1 -1 0 0 28 18 0.0000 4 195 1050 1635 12990 Utilities\001
4 1 -1 0 0 28 18 0.0000 4 240 2325 8040 12990 Storage Managers\001
4 1 -1 0 0 0 18 0.0000 4 255 840 4800 12975 Catalog\001
...
...
src/tools/backend/flow.jpg
View replaced file @
21ad8695
View file @
439a2af0
72.5 KB
|
W:
|
H:
74.4 KB
|
W:
|
H:
2-up
Swipe
Onion skin
src/tools/backend/index.html
View file @
439a2af0
...
...
@@ -11,10 +11,6 @@ by Bruce Momjian
</H2>
<P>
<CENTER>
<EM><BIG>
Click on an item to see more detail or look at the full
<A
HREF=
"backend_dirs.html"
>
index.
</A>
</BIG></EM>
<BR>
<BR>
<IMG
src=
"flow.jpg"
usemap=
"#flowmap"
alt=
"flowchart"
>
...
...
@@ -38,10 +34,12 @@ Click on an item to see more detail or look at the full
<AREA
COORDS=
"340,900,500,950"
HREF=
"backend_dirs.html#nodes"
>
<AREA
COORDS=
"20,990,180,1030"
HREF=
"backend_dirs.html#bootstrap"
>
</MAP>
<CENTER><EM>
Click on an item to see more detail or look at the full
<A
HREF=
"backend_dirs.html"
>
index.
</A>
</EM></CENTER>
<BR>
<P>
<HR>
<P>
A query comes to the backend via data packets arriving through TCP/IP or
...
...
@@ -117,8 +115,8 @@ can be accessed by clicking on the flowchart.<P>
Another area of interest is the shared memory area, which contains data
accessable to all backends. It has
table recently used data/index
blocks, locks, backend
information, and lookup tables for these
accessable to all backends. It has
recently used data/index blocks,
locks, backend process
information, and lookup tables for these
structures:
<UL>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment