


Page splits “ cascade upwards” in a recursive fashion. Page splits must also insert a new downlink to the new page in the parent page, which may cause the parent to split in turn. A page split operation makes room for items that originally belonged on the overflowing page by moving a portion of the items to a new page.

New leaf pages are added to a B-Tree index when an existing leaf page cannot fit an incoming tuple. Both internal pages and leaf pages use the standard page format described in Section 73.6. Typically, over 99% of all pages are leaf pages. Each internal page contains tuples that point to the next level down in the tree. Each leaf page contains tuples that point to table rows. All other levels consist of internal pages. Leaf pages are the pages on the lowest level of the tree. All other pages are either leaf pages or internal pages. A single metapage is stored in a fixed position at the start of the first segment file of the index. PostgreSQL B-Tree indexes are multi-level tree structures, where each level of the tree can be used as a doubly-linked list of pages.
