forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit67b0b2d
committed
Reconsider nbtree page deletion assertion.
Commit624686a added an assertion that verified that _bt_searchsuccessfully relocated the leaf page undergoing deletion. Page deletioncannot deal with the case where the descent stack is to the right of thepage, so this seemed critical (deletion can only handle the case wherethe descent stack is to the left of the leaf/target page). However, theassertion went a bit too far.Since only a buffer pin is held on the leaf page throughout the call to_bt_search, nothing guarantees that it can't have split during thissmall window. And if does actually split, _bt_search may end up"relocating" a page to the right of the original target leaf page. Thisscenario seems extremely unlikely, but it must still be considered.Remove the assertion, and document how we cope in this scenario.1 parentc301c2e commit67b0b2d
1 file changed
+11
-5
lines changedLines changed: 11 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1599 | 1599 |
| |
1600 | 1600 |
| |
1601 | 1601 |
| |
1602 |
| - | |
1603 |
| - | |
1604 | 1602 |
| |
1605 | 1603 |
| |
1606 | 1604 |
| |
1607 | 1605 |
| |
1608 | 1606 |
| |
1609 | 1607 |
| |
1610 | 1608 |
| |
| 1609 | + | |
| 1610 | + | |
| 1611 | + | |
| 1612 | + | |
| 1613 | + | |
| 1614 | + | |
| 1615 | + | |
| 1616 | + | |
| 1617 | + | |
1611 | 1618 |
| |
1612 | 1619 |
| |
1613 | 1620 |
| |
| |||
1735 | 1742 |
| |
1736 | 1743 |
| |
1737 | 1744 |
| |
1738 |
| - | |
1739 |
| - | |
1740 |
| - | |
| 1745 | + | |
| 1746 | + | |
1741 | 1747 |
| |
1742 | 1748 |
| |
1743 | 1749 |
| |
|
0 commit comments
Comments
(0)