- Notifications
You must be signed in to change notification settings - Fork5
Commit9b5b961
committed
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 willautomatically free the ExprContexts in reverse creation order. Theexisting coding was effectively freeing them in exactly the worstpossible 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.1 parent95c7bff commit9b5b961
File tree
3 files changed
+21
-18
lines changed- src/backend/executor
3 files changed
+21
-18
lines changedLines changed: 13 additions & 14 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| |||
620 | 620 |
| |
621 | 621 |
| |
622 | 622 |
| |
623 |
| - | |
624 |
| - | |
625 |
| - | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
626 | 626 |
| |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
627 | 634 |
| |
628 | 635 |
| |
629 | 636 |
| |
630 | 637 |
| |
631 | 638 |
| |
632 |
| - | |
633 |
| - | |
634 | 639 |
| |
635 |
| - | |
636 |
| - | |
| 640 | + | |
| 641 | + | |
637 | 642 |
| |
638 |
| - | |
639 |
| - | |
640 |
| - | |
641 |
| - | |
642 |
| - | |
643 |
| - | |
644 | 643 |
| |
645 | 644 |
| |
646 | 645 |
| |
|
Lines changed: 4 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| |||
220 | 220 |
| |
221 | 221 |
| |
222 | 222 |
| |
223 |
| - | |
| 223 | + | |
224 | 224 |
| |
| 225 | + | |
225 | 226 |
| |
226 | 227 |
| |
227 | 228 |
| |
| 229 | + | |
228 | 230 |
| |
229 | 231 |
| |
230 | 232 |
| |
|
Lines changed: 4 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| |||
534 | 534 |
| |
535 | 535 |
| |
536 | 536 |
| |
537 |
| - | |
| 537 | + | |
538 | 538 |
| |
| 539 | + | |
539 | 540 |
| |
540 | 541 |
| |
541 | 542 |
| |
| 543 | + | |
542 | 544 |
| |
543 | 545 |
| |
544 | 546 |
| |
|
0 commit comments
Comments
(0)