forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitf762b2f
committed
Add defensive "split_only_page" nbtree assertion.
Clearly it's not okay for nbtree to split a page that is the only pageon its level, and then find that it has to split the parent one level upin turn. There is simply no code to handle the split_only_page case inthe _bt_insertonpg() "newitem won't fit" branch (only the "newitem fits"branch handles split_only_page). Add a defensive assertion that willfail if a split_only_page call to _bt_insertonpg() somehow ends upsplitting the target/parent page.I (pgeoghegan) believe that we don't need split_only_page handling forthe "newitem won't fit" branch because anybody calling _bt_insertonpg()like this would have to hold a lock on the same one and only child page.1 parenta6fea12 commitf762b2f
1 file changed
+2
-0
lines changedLines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1183 | 1183 |
| |
1184 | 1184 |
| |
1185 | 1185 |
| |
| 1186 | + | |
| 1187 | + | |
1186 | 1188 |
| |
1187 | 1189 |
| |
1188 | 1190 |
| |
|
0 commit comments
Comments
(0)