• Peter Geoghegan's avatar
    Adjust "root of to-be-deleted subtree" function. · 624686ab
    Peter Geoghegan authored
    Restructure the function that locates the root of the to-be-deleted
    subtree during nbtree page deletion.  Handle the conditions that make
    page deletion unsafe in a slightly more uniform way, and acknowledge the
    fact that the behavior with incomplete splits on internal pages is
    different (as pointed out in the nbtree README as of commit 35bc0ec7).
    Also invent new terminology that avoids ambiguity around which pages are
    about to be deleted.  Consistently use the term "to-be-deleted subtree",
    not the ambiguous term "branch".
    
    We were calling the subtree parent page the "top parent page", but that
    was quite misleading.  The top parent page usually refers to a page
    unlinked from its siblings and marked deleted (during the second stage
    of page deletion).  There was one kind of top parent page that we merely
    removed a downlink from, and another kind of top parent page that we
    actually marked deleted.  Eliminate the ambiguity by inventing a new
    term ("subtree parent page") that refers to the former kind of page
    only.
    624686ab
nbtinsert.c 91.4 KB