forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitd573e23
committed
Take fewer snapshots.
When a PORTAL_ONE_SELECT query is executed, we can opportunisticallyreuse the parse/plan shot for the execution phase. This cuts down thenumber of snapshots per simple query from 2 to 1 for the simpleprotocol, and 3 to 2 for the extended protocol. Since we are onlyreusing a snapshot taken early in the processing of the same protocolmessage, the change shouldn't be user-visible, except that the remotepossibility of the planning and execution snapshots being different iseliminated.Note that this change does not make it safe to assume that the parse/plansnapshot will certainly be reused; that will currently only happen ifPortalStart() decides to use the PORTAL_ONE_SELECT strategy. It mightbe worth trying to provide some stronger guarantees here in the future,but for now we don't.Patch by me; review by Dimitri Fontaine.1 parente1042a3 commitd573e23
File tree
6 files changed
+39
-32
lines changed- src
- backend
- commands
- executor
- tcop
- include/tcop
6 files changed
+39
-32
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
124 | | - | |
| 124 | + | |
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
278 | 278 | | |
279 | 279 | | |
280 | 280 | | |
281 | | - | |
| 281 | + | |
282 | 282 | | |
283 | 283 | | |
284 | 284 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1126 | 1126 | | |
1127 | 1127 | | |
1128 | 1128 | | |
1129 | | - | |
1130 | 1129 | | |
1131 | 1130 | | |
1132 | 1131 | | |
| |||
1269 | 1268 | | |
1270 | 1269 | | |
1271 | 1270 | | |
1272 | | - | |
1273 | | - | |
1274 | | - | |
1275 | | - | |
1276 | | - | |
1277 | | - | |
1278 | | - | |
1279 | | - | |
1280 | | - | |
1281 | 1271 | | |
1282 | 1272 | | |
1283 | 1273 | | |
| |||
1293 | 1283 | | |
1294 | 1284 | | |
1295 | 1285 | | |
1296 | | - | |
| 1286 | + | |
| 1287 | + | |
| 1288 | + | |
| 1289 | + | |
| 1290 | + | |
| 1291 | + | |
| 1292 | + | |
1297 | 1293 | | |
1298 | 1294 | | |
1299 | 1295 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
943 | 943 | | |
944 | 944 | | |
945 | 945 | | |
946 | | - | |
947 | | - | |
948 | | - | |
949 | | - | |
950 | 946 | | |
951 | 947 | | |
952 | 948 | | |
| |||
971 | 967 | | |
972 | 968 | | |
973 | 969 | | |
974 | | - | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
975 | 977 | | |
976 | | - | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
977 | 983 | | |
978 | 984 | | |
979 | 985 | | |
| |||
1696 | 1702 | | |
1697 | 1703 | | |
1698 | 1704 | | |
1699 | | - | |
1700 | | - | |
1701 | | - | |
1702 | | - | |
1703 | 1705 | | |
1704 | 1706 | | |
| 1707 | + | |
| 1708 | + | |
| 1709 | + | |
| 1710 | + | |
1705 | 1711 | | |
1706 | | - | |
| 1712 | + | |
| 1713 | + | |
| 1714 | + | |
| 1715 | + | |
| 1716 | + | |
1707 | 1717 | | |
1708 | 1718 | | |
1709 | 1719 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
446 | 446 | | |
447 | 447 | | |
448 | 448 | | |
449 | | - | |
450 | | - | |
451 | | - | |
452 | | - | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
453 | 454 | | |
454 | 455 | | |
455 | 456 | | |
456 | 457 | | |
457 | 458 | | |
458 | | - | |
| 459 | + | |
459 | 460 | | |
460 | 461 | | |
461 | 462 | | |
| |||
497 | 498 | | |
498 | 499 | | |
499 | 500 | | |
500 | | - | |
501 | | - | |
| 501 | + | |
| 502 | + | |
502 | 503 | | |
503 | 504 | | |
504 | 505 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| |||
0 commit comments
Comments
(0)