- Notifications
You must be signed in to change notification settings - Fork5
Commitbef2d62
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 parent42ebdc8 commitbef2d62
1 file changed
+25
-0
lines changedLines changed: 25 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
702 | 702 |
| |
703 | 703 |
| |
704 | 704 |
| |
| 705 | + | |
| 706 | + | |
| 707 | + | |
705 | 708 |
| |
706 | 709 |
| |
707 | 710 |
| |
| |||
712 | 715 |
| |
713 | 716 |
| |
714 | 717 |
| |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
715 | 735 |
| |
716 | 736 |
| |
717 | 737 |
| |
| |||
758 | 778 |
| |
759 | 779 |
| |
760 | 780 |
| |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
761 | 786 |
| |
762 | 787 |
| |
763 | 788 |
| |
|
0 commit comments
Comments
(0)