forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit4fceb45
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 parentd35f1d4 commit4fceb45
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 |
| |
| |||
239 | 240 |
| |
240 | 241 |
| |
241 | 242 |
| |
| 243 | + | |
| 244 | + | |
| 245 | + | |
242 | 246 |
| |
243 | 247 |
| |
244 | 248 |
| |
| |||
736 | 740 |
| |
737 | 741 |
| |
738 | 742 |
| |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
739 | 748 |
| |
740 | 749 |
| |
741 | 750 |
| |
| |||
1855 | 1864 |
| |
1856 | 1865 |
| |
1857 | 1866 |
| |
| 1867 | + | |
| 1868 | + | |
| 1869 | + | |
1858 | 1870 |
| |
1859 | 1871 |
| |
1860 | 1872 |
| |
|
0 commit comments
Comments
(0)