forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitbe4b0c0
committed
Avoid lockup of a parallel worker when reporting a long error message.
Because sigsetjmp() will restore the initial state with signals blocked,the code path in bgworker.c for reporting an error and exiting wouldexecute that way. Usually this is fairly harmless; but if a parallelworker had an error message exceeding the shared-memory communicationbuffer size (16K) it would lock up, because it would wait for aresume-sending signal from its parallel leader which it would neverdetect.To fix, just unblock signals at the appropriate point.This can be shown to fail back to 9.6. The lack of parallel queryinfrastructure makes it difficult to provide a simple test case for9.5; but I'm pretty sure the issue exists in some form there as well,so apply the code change there too.Vignesh C, reviewed by Bharath Rupireddy, Robert Haas, and myselfDiscussion:https://postgr.es/m/CALDaNm1d1hHPZUg3xU4XjtWBOLCrA+-2cJcLpw-cePZ=GgDVfA@mail.gmail.com1 parent8f8154a commitbe4b0c0
File tree
3 files changed
+14
-5
lines changed- src
- backend/postmaster
- test/regress
- expected
- sql
3 files changed
+14
-5
lines changedLines changed: 9 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
743 | 743 |
| |
744 | 744 |
| |
745 | 745 |
| |
746 |
| - | |
| 746 | + | |
747 | 747 |
| |
748 | 748 |
| |
749 | 749 |
| |
| |||
753 | 753 |
| |
754 | 754 |
| |
755 | 755 |
| |
756 |
| - | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
757 | 764 |
| |
758 | 765 |
| |
759 | 766 |
| |
|
0 commit comments
Comments
(0)