- Notifications
You must be signed in to change notification settings - Fork5
Commit4c77cbb
committed
PortalRun must guard against the possibility that the portal it's
running contains VACUUM or a similar command that will internally startand commit transactions. In such a case, the original caller values ofCurrentMemoryContext and CurrentResourceOwner will point to objects thatwill be destroyed by the internal commit. We must restore these pointersto point to the newly-manufactured transaction context and resource owner,rather than possibly pointing to deleted memory.Also tweak xact.c so that AbortTransaction and AbortSubTransactionforcibly restore a sane value for CurrentResourceOwner, much as theyhave always done for CurrentMemoryContext. I'm not certain this isnecessary but I'm feeling paranoid today.Responds to Sean Chittenden's bug report of 4-Oct.1 parentee7de3d commit4c77cbb
2 files changed
+68
-10
lines changedLines changed: 33 additions & 3 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 |
| |
| |||
205 | 205 |
| |
206 | 206 |
| |
207 | 207 |
| |
| 208 | + | |
208 | 209 |
| |
209 | 210 |
| |
210 | 211 |
| |
| |||
229 | 230 |
| |
230 | 231 |
| |
231 | 232 |
| |
| 233 | + | |
232 | 234 |
| |
233 | 235 |
| |
234 | 236 |
| |
| |||
1103 | 1105 |
| |
1104 | 1106 |
| |
1105 | 1107 |
| |
1106 |
| - | |
1107 | 1108 |
| |
1108 | 1109 |
| |
1109 | 1110 |
| |
| |||
1115 | 1116 |
| |
1116 | 1117 |
| |
1117 | 1118 |
| |
| 1119 | + | |
| 1120 | + | |
| 1121 | + | |
| 1122 | + | |
| 1123 | + | |
| 1124 | + | |
| 1125 | + | |
| 1126 | + | |
| 1127 | + | |
| 1128 | + | |
| 1129 | + | |
| 1130 | + | |
| 1131 | + | |
| 1132 | + | |
| 1133 | + | |
| 1134 | + | |
| 1135 | + | |
| 1136 | + | |
| 1137 | + | |
| 1138 | + | |
| 1139 | + | |
| 1140 | + | |
| 1141 | + | |
| 1142 | + | |
| 1143 | + | |
| 1144 | + | |
| 1145 | + | |
1118 | 1146 |
| |
1119 | 1147 |
| |
1120 | 1148 |
| |
| |||
1598 | 1626 |
| |
1599 | 1627 |
| |
1600 | 1628 |
| |
1601 |
| - | |
| 1629 | + | |
1602 | 1630 |
| |
| 1631 | + | |
1603 | 1632 |
| |
1604 | 1633 |
| |
1605 | 1634 |
| |
| |||
3338 | 3367 |
| |
3339 | 3368 |
| |
3340 | 3369 |
| |
| 3370 | + | |
3341 | 3371 |
| |
3342 | 3372 |
| |
3343 | 3373 |
| |
|
Lines changed: 35 additions & 7 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 |
| |
| |||
491 | 491 |
| |
492 | 492 |
| |
493 | 493 |
| |
| 494 | + | |
| 495 | + | |
494 | 496 |
| |
495 | 497 |
| |
496 | 498 |
| |
497 | 499 |
| |
498 | 500 |
| |
499 |
| - | |
| 501 | + | |
500 | 502 |
| |
501 | 503 |
| |
502 | 504 |
| |
| |||
523 | 525 |
| |
524 | 526 |
| |
525 | 527 |
| |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
526 | 539 |
| |
| 540 | + | |
| 541 | + | |
527 | 542 |
| |
528 | 543 |
| |
529 | 544 |
| |
530 | 545 |
| |
531 | 546 |
| |
| 547 | + | |
532 | 548 |
| |
533 | 549 |
| |
534 | 550 |
| |
| |||
537 | 553 |
| |
538 | 554 |
| |
539 | 555 |
| |
540 |
| - | |
| 556 | + | |
541 | 557 |
| |
542 | 558 |
| |
543 | 559 |
| |
| |||
620 | 636 |
| |
621 | 637 |
| |
622 | 638 |
| |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
623 | 643 |
| |
624 | 644 |
| |
625 |
| - | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
626 | 649 |
| |
627 | 650 |
| |
628 | 651 |
| |
629 | 652 |
| |
630 | 653 |
| |
631 | 654 |
| |
632 | 655 |
| |
633 |
| - | |
634 |
| - | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
635 | 660 |
| |
636 | 661 |
| |
637 |
| - | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
638 | 666 |
| |
639 | 667 |
| |
640 | 668 |
| |
|
0 commit comments
Comments
(0)