- Notifications
You must be signed in to change notification settings - Fork5
Commitc0f03aa
committed
Fix ALTER TABLE ONLY .. DROP CONSTRAINT.
When I consolidated two copies of the HOT-chain search logic in commit4da99ea, I introduced a behaviorchange: the old code wouldn't necessarily traverse the entire chain,if the most recently returned tuple were updated while the HOT chaintraversal is in progress. The new behavior seems more correct, butunfortunately, the code here relies on a scan with SnapshotNow failingto see its own updates. That seems pretty shaky even with the old HOTchain traversal behavior, since there's no guarantee that theseupdates will always be HOT, but it's trivial to broke a failure withthe new HOT search logic. Fix by updating just the first matchingpg_constraint tuple, rather than all of them, since there should beonly one anyway. But since nobody has reproduced this failure on olderversions, no back-patch for now.Report and test case by Alex Hunsaker; tablecmds.c changes by me.1 parentc980426 commitc0f03aa
File tree
3 files changed
+65
-51
lines changed- src
- backend/commands
- test/regress
- expected
- sql
3 files changed
+65
-51
lines changedLines changed: 48 additions & 51 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
6734 | 6734 |
| |
6735 | 6735 |
| |
6736 | 6736 |
| |
| 6737 | + | |
6737 | 6738 |
| |
6738 | 6739 |
| |
6739 | 6740 |
| |
| |||
6746 | 6747 |
| |
6747 | 6748 |
| |
6748 | 6749 |
| |
6749 |
| - | |
6750 |
| - | |
| 6750 | + | |
6751 | 6751 |
| |
6752 | 6752 |
| |
6753 |
| - | |
6754 |
| - | |
6755 | 6753 |
| |
6756 | 6754 |
| |
6757 | 6755 |
| |
6758 | 6756 |
| |
6759 | 6757 |
| |
6760 | 6758 |
| |
6761 |
| - | |
6762 |
| - | |
| 6759 | + | |
| 6760 | + | |
| 6761 | + | |
6763 | 6762 |
| |
6764 |
| - | |
| 6763 | + | |
| 6764 | + | |
| 6765 | + | |
| 6766 | + | |
| 6767 | + | |
| 6768 | + | |
6765 | 6769 |
| |
6766 |
| - | |
6767 |
| - | |
6768 |
| - | |
| 6770 | + | |
6769 | 6771 |
| |
6770 |
| - | |
6771 |
| - | |
| 6772 | + | |
6772 | 6773 |
| |
6773 |
| - | |
6774 |
| - | |
6775 |
| - | |
6776 |
| - | |
6777 |
| - | |
6778 |
| - | |
6779 |
| - | |
6780 |
| - | |
6781 |
| - | |
6782 |
| - | |
6783 |
| - | |
6784 |
| - | |
6785 |
| - | |
6786 |
| - | |
6787 |
| - | |
6788 |
| - | |
6789 |
| - | |
6790 |
| - | |
6791 |
| - | |
6792 |
| - | |
| 6774 | + | |
6793 | 6775 |
| |
6794 |
| - | |
6795 |
| - | |
6796 |
| - | |
| 6776 | + | |
| 6777 | + | |
| 6778 | + | |
| 6779 | + | |
| 6780 | + | |
| 6781 | + | |
| 6782 | + | |
| 6783 | + | |
| 6784 | + | |
| 6785 | + | |
| 6786 | + | |
| 6787 | + | |
| 6788 | + | |
| 6789 | + | |
| 6790 | + | |
| 6791 | + | |
| 6792 | + | |
6797 | 6793 |
| |
6798 | 6794 |
| |
6799 | 6795 |
| |
6800 |
| - | |
6801 |
| - | |
6802 |
| - | |
6803 |
| - | |
6804 |
| - | |
| 6796 | + | |
6805 | 6797 |
| |
6806 |
| - | |
6807 |
| - | |
6808 | 6798 |
| |
6809 | 6799 |
| |
6810 | 6800 |
| |
6811 | 6801 |
| |
6812 | 6802 |
| |
6813 | 6803 |
| |
6814 |
| - | |
6815 |
| - | |
6816 | 6804 |
| |
| 6805 | + | |
| 6806 | + | |
| 6807 | + | |
| 6808 | + | |
| 6809 | + | |
| 6810 | + | |
| 6811 | + | |
| 6812 | + | |
| 6813 | + | |
6817 | 6814 |
| |
6818 |
| - | |
| 6815 | + | |
| 6816 | + | |
6819 | 6817 |
| |
6820 |
| - | |
6821 |
| - | |
6822 |
| - | |
6823 |
| - | |
6824 |
| - | |
6825 |
| - | |
| 6818 | + | |
| 6819 | + | |
| 6820 | + | |
| 6821 | + | |
| 6822 | + | |
6826 | 6823 |
| |
6827 | 6824 |
| |
6828 | 6825 |
| |
|
Lines changed: 9 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2103 | 2103 |
| |
2104 | 2104 |
| |
2105 | 2105 |
| |
| 2106 | + | |
| 2107 | + | |
| 2108 | + | |
| 2109 | + | |
| 2110 | + | |
| 2111 | + | |
| 2112 | + | |
| 2113 | + | |
| 2114 | + |
Lines changed: 8 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1456 | 1456 |
| |
1457 | 1457 |
| |
1458 | 1458 |
| |
| 1459 | + | |
| 1460 | + | |
| 1461 | + | |
| 1462 | + | |
| 1463 | + | |
| 1464 | + | |
| 1465 | + | |
| 1466 | + |
0 commit comments
Comments
(0)