forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit97431d6
committed
Add some recursion and looping defenses in prepjointree.c.
Andrey Lepikhov demonstrated a case where we spend an unreasonableamount of time in pull_up_subqueries(). Not only is that recursingwith no explicit check for stack overrun, but the code seems notinterruptable by control-C. Let's stick a CHECK_FOR_INTERRUPTSthere, along with sprinkling some stack depth checks.An actual fix for the excessive time consumption seems a bitrisky to back-patch; but this isn't, so let's do so.Discussion:https://postgr.es/m/703c09a2-08f3-d2ec-b33d-dbecd62428b8@postgrespro.ru1 parentf489b48 commit97431d6
1 file changed
+12
-0
lines changedLines changed: 12 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
27 | 27 |
| |
28 | 28 |
| |
29 | 29 |
| |
| 30 | + | |
30 | 31 |
| |
31 | 32 |
| |
32 | 33 |
| |
| |||
235 | 236 |
| |
236 | 237 |
| |
237 | 238 |
| |
| 239 | + | |
| 240 | + | |
| 241 | + | |
238 | 242 |
| |
239 | 243 |
| |
240 | 244 |
| |
| |||
732 | 736 |
| |
733 | 737 |
| |
734 | 738 |
| |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
735 | 744 |
| |
736 | 745 |
| |
737 | 746 |
| |
| |||
1854 | 1863 |
| |
1855 | 1864 |
| |
1856 | 1865 |
| |
| 1866 | + | |
| 1867 | + | |
| 1868 | + | |
1857 | 1869 |
| |
1858 | 1870 |
| |
1859 | 1871 |
| |
|
0 commit comments
Comments
(0)