forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit1591fcb
committed
Revert my bad decision of about a year ago to make PortalDefineQuery
responsible for copying the query string into the new Portal. Such copyingis unnecessary in the common code path through exec_simple_query, and inthis case it can be enormously expensive because the string might containa large number of individual commands; we were copying the entire, longstring for each command, resulting in O(N^2) behavior for N commands.(This is the cause of bug #4079.) A second problem with it is thatPortalDefineQuery really can't risk error, because if it elog's beforehaving set up the Portal, we will leak the plancache refcount that thecaller is trying to hand off to the portal. So go back to the design inwhich the caller is responsible for making sure everything is copied intothe portal if necessary.1 parentad6bf71 commit1591fcb
File tree
5 files changed
+73
-24
lines changed- src/backend
- commands
- executor
- tcop
- utils/mmgr
5 files changed
+73
-24
lines changedLines changed: 4 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
14 | 14 |
| |
15 | 15 |
| |
16 | 16 |
| |
17 |
| - | |
| 17 | + | |
18 | 18 |
| |
19 | 19 |
| |
20 | 20 |
| |
| |||
77 | 77 |
| |
78 | 78 |
| |
79 | 79 |
| |
| 80 | + | |
| 81 | + | |
| 82 | + | |
80 | 83 |
| |
81 | 84 |
| |
82 | 85 |
| |
|
Lines changed: 6 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
10 | 10 |
| |
11 | 11 |
| |
12 | 12 |
| |
13 |
| - | |
| 13 | + | |
14 | 14 |
| |
15 | 15 |
| |
16 | 16 |
| |
| |||
250 | 250 |
| |
251 | 251 |
| |
252 | 252 |
| |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
253 | 257 |
| |
254 | 258 |
| |
255 |
| - | |
| 259 | + | |
256 | 260 |
| |
257 | 261 |
| |
258 | 262 |
| |
|
Lines changed: 18 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| |||
918 | 918 |
| |
919 | 919 |
| |
920 | 920 |
| |
| 921 | + | |
921 | 922 |
| |
922 | 923 |
| |
923 | 924 |
| |
| |||
968 | 969 |
| |
969 | 970 |
| |
970 | 971 |
| |
| 972 | + | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
971 | 985 |
| |
972 | 986 |
| |
973 | 987 |
| |
974 |
| - | |
975 | 988 |
| |
976 | 989 |
| |
977 | 990 |
| |
| |||
1000 | 1013 |
| |
1001 | 1014 |
| |
1002 | 1015 |
| |
1003 |
| - | |
1004 | 1016 |
| |
1005 | 1017 |
| |
1006 | 1018 |
| |
1007 | 1019 |
| |
| 1020 | + | |
| 1021 | + | |
1008 | 1022 |
| |
1009 | 1023 |
| |
1010 | 1024 |
| |
| |||
1025 | 1039 |
| |
1026 | 1040 |
| |
1027 | 1041 |
| |
1028 |
| - | |
| 1042 | + | |
1029 | 1043 |
| |
1030 | 1044 |
| |
1031 | 1045 |
| |
|
Lines changed: 33 additions & 9 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| |||
933 | 933 |
| |
934 | 934 |
| |
935 | 935 |
| |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
936 | 941 |
| |
937 | 942 |
| |
938 | 943 |
| |
| |||
1356 | 1361 |
| |
1357 | 1362 |
| |
1358 | 1363 |
| |
| 1364 | + | |
| 1365 | + | |
1359 | 1366 |
| |
1360 | 1367 |
| |
| 1368 | + | |
1361 | 1369 |
| |
1362 | 1370 |
| |
1363 | 1371 |
| |
| |||
1461 | 1469 |
| |
1462 | 1470 |
| |
1463 | 1471 |
| |
| 1472 | + | |
| 1473 | + | |
| 1474 | + | |
| 1475 | + | |
| 1476 | + | |
| 1477 | + | |
| 1478 | + | |
| 1479 | + | |
| 1480 | + | |
| 1481 | + | |
| 1482 | + | |
| 1483 | + | |
| 1484 | + | |
| 1485 | + | |
| 1486 | + | |
| 1487 | + | |
| 1488 | + | |
| 1489 | + | |
| 1490 | + | |
1464 | 1491 |
| |
1465 | 1492 |
| |
1466 | 1493 |
| |
1467 | 1494 |
| |
1468 | 1495 |
| |
1469 |
| - | |
1470 | 1496 |
| |
1471 | 1497 |
| |
1472 |
| - | |
1473 |
| - | |
1474 | 1498 |
| |
1475 | 1499 |
| |
1476 | 1500 |
| |
| |||
1595 | 1619 |
| |
1596 | 1620 |
| |
1597 | 1621 |
| |
1598 |
| - | |
1599 |
| - | |
1600 | 1622 |
| |
1601 | 1623 |
| |
1602 | 1624 |
| |
1603 | 1625 |
| |
| 1626 | + | |
| 1627 | + | |
| 1628 | + | |
1604 | 1629 |
| |
1605 | 1630 |
| |
1606 | 1631 |
| |
| |||
1627 | 1652 |
| |
1628 | 1653 |
| |
1629 | 1654 |
| |
1630 |
| - | |
1631 | 1655 |
| |
1632 | 1656 |
| |
1633 | 1657 |
| |
| |||
1665 | 1689 |
| |
1666 | 1690 |
| |
1667 | 1691 |
| |
1668 |
| - | |
1669 |
| - | |
| 1692 | + | |
| 1693 | + | |
1670 | 1694 |
| |
1671 | 1695 |
| |
1672 | 1696 |
| |
|
Lines changed: 12 additions & 8 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
15 |
| - | |
| 15 | + | |
16 | 16 |
| |
17 | 17 |
| |
18 | 18 |
| |
| |||
274 | 274 |
| |
275 | 275 |
| |
276 | 276 |
| |
277 |
| - | |
278 |
| - | |
279 |
| - | |
| 277 | + | |
280 | 278 |
| |
281 | 279 |
| |
282 | 280 |
| |
| |||
285 | 283 |
| |
286 | 284 |
| |
287 | 285 |
| |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
288 | 294 |
| |
289 | 295 |
| |
290 | 296 |
| |
| |||
299 | 305 |
| |
300 | 306 |
| |
301 | 307 |
| |
302 |
| - | |
303 |
| - | |
304 |
| - | |
305 |
| - | |
| 308 | + | |
| 309 | + | |
306 | 310 |
| |
307 | 311 |
| |
308 | 312 |
| |
|
0 commit comments
Comments
(0)