]> granicus.if.org Git - postgresql/commit
Major overhaul of btree index code. Eliminate special BTP_CHAIN logic for
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 21 Jul 2000 06:42:39 +0000 (06:42 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 21 Jul 2000 06:42:39 +0000 (06:42 +0000)
commit9e85183bfc31c05bec81585ee43a27b6402a5c02
tree38a55a6343c97b8843a1e58744b30e83b17d44a9
parentc9537ca88fae6dbb38fe1c9440b822a34cefe34c
Major overhaul of btree index code.  Eliminate special BTP_CHAIN logic for
duplicate keys by letting search go to the left rather than right when an
equal key is seen at an upper tree level.  Fix poor choice of page split
point (leading to insertion failures) that was forced by chaining logic.
Don't store leftmost key in non-leaf pages, since it's not necessary.
Don't create root page until something is first stored in the index, so an
unused index is now 8K not 16K.  (Doesn't seem to be as easy to get rid of
the metadata page, unfortunately.)  Massive cleanup of unreadable code,
fix poor, obsolete, and just plain wrong documentation and comments.
See src/backend/access/nbtree/README for the gory details.
src/backend/access/nbtree/README
src/backend/access/nbtree/nbtinsert.c
src/backend/access/nbtree/nbtpage.c
src/backend/access/nbtree/nbtree.c
src/backend/access/nbtree/nbtscan.c
src/backend/access/nbtree/nbtsearch.c
src/backend/access/nbtree/nbtsort.c
src/backend/access/nbtree/nbtutils.c
src/backend/storage/page/bufpage.c
src/include/access/nbtree.h
src/include/storage/bufpage.h