From: | tgl(at)svr1(dot)postgresql(dot)org (Tom Lane) |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Remove explicit FreeExprContext calls during plan node shutdown. |
Date: | 2005-04-23 21:32:34 |
Message-ID: | 20050423213234.F165053877@svr1.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Log Message:
-----------
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.
Modified Files:
--------------
pgsql/src/backend/executor:
execUtils.c (r1.121 -> r1.122)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/executor/execUtils.c.diff?r1=1.121&r2=1.122)
nodeBitmapIndexscan.c (r1.3 -> r1.4)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/executor/nodeBitmapIndexscan.c.diff?r1=1.3&r2=1.4)
nodeIndexscan.c (r1.100 -> r1.101)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/executor/nodeIndexscan.c.diff?r1=1.100&r2=1.101)
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2005-04-23 21:38:42 | pgsql: Done: < * Improve SMP performance on i386 machines > * -Improve |
Previous Message | Bruce Momjian | 2005-04-23 21:25:49 | pgsql: Done: < * Optimize locale to have minimal performance impact |