mirror of
https://github.com/postgres/postgres.git
synced 2025-05-29 00:03:09 -04:00
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 foreign scans, as none of the other scan nodes litter the per-tuple memory context when there's no quals or projections.
This commit is contained in:
parent
27c7875d95
commit
0319da638f
@ -120,13 +120,17 @@ ExecScan(ScanState *node,
|
|||||||
*/
|
*/
|
||||||
qual = node->ps.qual;
|
qual = node->ps.qual;
|
||||||
projInfo = node->ps.ps_ProjInfo;
|
projInfo = node->ps.ps_ProjInfo;
|
||||||
|
econtext = node->ps.ps_ExprContext;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If we have neither a qual to check nor a projection to do, just skip
|
* If we have neither a qual to check nor a projection to do, just skip
|
||||||
* all the overhead and return the raw scan tuple.
|
* all the overhead and return the raw scan tuple.
|
||||||
*/
|
*/
|
||||||
if (!qual && !projInfo)
|
if (!qual && !projInfo)
|
||||||
|
{
|
||||||
|
ResetExprContext(econtext);
|
||||||
return ExecScanFetch(node, accessMtd, recheckMtd);
|
return ExecScanFetch(node, accessMtd, recheckMtd);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Check to see if we're still projecting out tuples from a previous scan
|
* Check to see if we're still projecting out tuples from a previous scan
|
||||||
@ -148,7 +152,6 @@ ExecScan(ScanState *node,
|
|||||||
* storage allocated in the previous tuple cycle. Note this can't happen
|
* storage allocated in the previous tuple cycle. Note this can't happen
|
||||||
* until we're done projecting out tuples from a scan tuple.
|
* until we're done projecting out tuples from a scan tuple.
|
||||||
*/
|
*/
|
||||||
econtext = node->ps.ps_ExprContext;
|
|
||||||
ResetExprContext(econtext);
|
ResetExprContext(econtext);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user