- Notifications
You must be signed in to change notification settings - Fork5
Commitb09caec
committed
Fix potential memory leakage from HandleParallelMessages().
HandleParallelMessages leaked memory into the caller's context. Since it'scalled from ProcessInterrupts, there is basically zero certainty as to whatCurrentMemoryContext is, which means we could be leaking into long-livedcontexts. Over the processing of many worker messages that would grow tobe a problem. Things could be even worse than just a leak, if we happenedto service the interrupt while ErrorContext is current: elog.c thinks itcan reset that on its own whim, possibly yanking storage out from underHandleParallelMessages.Give HandleParallelMessages its own dedicated context instead, which we canreset during each call to ensure there's no accumulation of wasted memory.Discussion: <16610.1472222135@sss.pgh.pa.us>1 parent51b5008 commitb09caec
1 file changed
+25
-0
lines changedLines changed: 25 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
627 | 627 |
| |
628 | 628 |
| |
629 | 629 |
| |
| 630 | + | |
| 631 | + | |
| 632 | + | |
630 | 633 |
| |
631 | 634 |
| |
632 | 635 |
| |
| |||
637 | 640 |
| |
638 | 641 |
| |
639 | 642 |
| |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
640 | 660 |
| |
641 | 661 |
| |
642 | 662 |
| |
| |||
683 | 703 |
| |
684 | 704 |
| |
685 | 705 |
| |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
686 | 711 |
| |
687 | 712 |
| |
688 | 713 |
| |
|
0 commit comments
Comments
(0)