mirror of
https://github.com/postgres/postgres.git
synced 2025-06-14 18:42:34 +03:00
Remove explicit FreeExprContext calls during plan node shutdown. The
ExprContexts will be freed anyway when FreeExecutorState() is reached, and letting that routine do the work is more efficient because it will automatically free the ExprContexts in reverse creation order. The existing coding was effectively freeing them in exactly the worst possible order, resulting in O(N^2) behavior inside list_delete_ptr, which becomes highly visible in cases with a few thousand plan nodes. ExecFreeExprContext is now effectively a no-op and could be removed, but I left it in place in case we ever want to put it back to use.
This commit is contained in:
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/executor/nodeBitmapIndexscan.c,v 1.3 2005/04/22 21:58:31 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/executor/nodeBitmapIndexscan.c,v 1.4 2005/04/23 21:32:34 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -220,11 +220,13 @@ ExecEndBitmapIndexScan(BitmapIndexScanState *node)
|
||||
relation = node->ss.ss_currentRelation;
|
||||
|
||||
/*
|
||||
* Free the exprcontext(s)
|
||||
* Free the exprcontext(s) ... now dead code, see ExecFreeExprContext
|
||||
*/
|
||||
#ifdef NOT_USED
|
||||
ExecFreeExprContext(&node->ss.ps);
|
||||
if (node->biss_RuntimeContext)
|
||||
FreeExprContext(node->biss_RuntimeContext);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* close the index relation
|
||||
|
Reference in New Issue
Block a user