forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitd572003
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 parentc8314d6 commitd572003
1 file changed
+12
-0
lines changedLines changed: 12 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
26 | 26 |
| |
27 | 27 |
| |
28 | 28 |
| |
| 29 | + | |
29 | 30 |
| |
30 | 31 |
| |
31 | 32 |
| |
| |||
230 | 231 |
| |
231 | 232 |
| |
232 | 233 |
| |
| 234 | + | |
| 235 | + | |
| 236 | + | |
233 | 237 |
| |
234 | 238 |
| |
235 | 239 |
| |
| |||
715 | 719 |
| |
716 | 720 |
| |
717 | 721 |
| |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
718 | 727 |
| |
719 | 728 |
| |
720 | 729 |
| |
| |||
1761 | 1770 |
| |
1762 | 1771 |
| |
1763 | 1772 |
| |
| 1773 | + | |
| 1774 | + | |
| 1775 | + | |
1764 | 1776 |
| |
1765 | 1777 |
| |
1766 | 1778 |
| |
|
0 commit comments
Comments
(0)