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

Commit0319da6

Browse files
committed
Reset per-tuple memory context between every row in a scan node, even when
there's no quals or projections. Currently this only matters for foreignscans, as none of the other scan nodes litter the per-tuple memory contextwhen there's no quals or projections.
1 parent27c7875 commit0319da6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

‎src/backend/executor/execScan.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,13 +120,17 @@ ExecScan(ScanState *node,
120120
*/
121121
qual=node->ps.qual;
122122
projInfo=node->ps.ps_ProjInfo;
123+
econtext=node->ps.ps_ExprContext;
123124

124125
/*
125126
* If we have neither a qual to check nor a projection to do, just skip
126127
* all the overhead and return the raw scan tuple.
127128
*/
128129
if (!qual&& !projInfo)
130+
{
131+
ResetExprContext(econtext);
129132
returnExecScanFetch(node,accessMtd,recheckMtd);
133+
}
130134

131135
/*
132136
* Check to see if we're still projecting out tuples from a previous scan
@@ -148,7 +152,6 @@ ExecScan(ScanState *node,
148152
* storage allocated in the previous tuple cycle. Note this can't happen
149153
* until we're done projecting out tuples from a scan tuple.
150154
*/
151-
econtext=node->ps.ps_ExprContext;
152155
ResetExprContext(econtext);
153156

154157
/*

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp