forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit28c16f4
committed
Remove unnecessary PageIsEmpty() nbtree build check.
nbtree index builds cannot write out an empty page. That would meanthat there was no way to create a pivot tuple pointing to the page onelevel up, since _bt_truncate() generates one based on page's firstrighttuple.Replace the unnecessary PageIsEmpty() check with an assertion thatchecks that the page has space for at least two line pointers (thewould-be high key line pointer, plus at least one valid "data item"tuple line pointer).The PageIsEmpty() check was added by commit5d9f146 over 20 years ago.It looks like it has always been unnecessary.1 parentf7f70d5 commit28c16f4
1 file changed
+18
-17
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
267 | 267 |
| |
268 | 268 |
| |
269 | 269 |
| |
270 |
| - | |
| 270 | + | |
271 | 271 |
| |
272 | 272 |
| |
273 | 273 |
| |
| |||
721 | 721 |
| |
722 | 722 |
| |
723 | 723 |
| |
724 |
| - | |
725 |
| - | |
726 |
| - | |
727 |
| - | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
728 | 731 |
| |
729 | 732 |
| |
730 |
| - | |
| 733 | + | |
731 | 734 |
| |
732 | 735 |
| |
733 | 736 |
| |
734 | 737 |
| |
735 |
| - | |
736 | 738 |
| |
737 |
| - | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
738 | 743 |
| |
739 |
| - | |
740 |
| - | |
741 |
| - | |
742 |
| - | |
743 |
| - | |
744 |
| - | |
745 |
| - | |
746 |
| - | |
747 |
| - | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
748 | 748 |
| |
| 749 | + | |
749 | 750 |
| |
750 | 751 |
| |
751 | 752 |
| |
|
0 commit comments
Comments
(0)