- Notifications
You must be signed in to change notification settings - Fork4.9k
Commitb805b63

Amit Kapila
Fix buffer usage stats for parallel nodes.
The buffer usage stats is accounted only for the execution phase of thenode. For Gather and Gather Merge nodes, such stats are accumulated atthe time of shutdown of workers which is done after execution of node dueto which we missed to account them for such nodes. Fix it by treatingnodes as running while we shut down them.We can also miss accounting for a Limit node when Gather or Gather Mergeis beneath it, because it can finish the execution before shutting downsuch nodes. So we allow a Limit node to shut down the resources before itcompletes the execution.In the passing fix the gather node code to allow workers to shut down assoon as we find that all the tuples from the workers have been retrieved.The original code use to do that, but is accidently removed by commit01edb5c.Reported-by: Adrien NayratAuthor: Amit Kapila and Robert HaasReviewed-by: Robert Haas and Andres FreundBackpatch-through: 9.6 where this code was introducedDiscussion:https://postgr.es/m/86137f17-1dfb-42f9-7421-82fd786b04a1@anayrat.info1 parent3f02b51 commitb805b63
3 files changed
+22
-0
lines changedLines changed: 17 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
737 | 737 |
| |
738 | 738 |
| |
739 | 739 |
| |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
740 | 753 |
| |
741 | 754 |
| |
742 | 755 |
| |
| |||
755 | 768 |
| |
756 | 769 |
| |
757 | 770 |
| |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
758 | 775 |
| |
759 | 776 |
|
Lines changed: 3 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
327 | 327 |
| |
328 | 328 |
| |
329 | 329 |
| |
| 330 | + | |
| 331 | + | |
330 | 332 |
| |
| 333 | + | |
331 | 334 |
| |
332 | 335 |
| |
333 | 336 |
| |
|
Lines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
134 | 134 |
| |
135 | 135 |
| |
136 | 136 |
| |
| 137 | + | |
| 138 | + | |
137 | 139 |
| |
138 | 140 |
| |
139 | 141 |
| |
|
0 commit comments
Comments
(0)