Add amgettreeheight index AM API routine
authorPeter Eisentraut <peter@eisentraut.org>
Tue, 10 Sep 2024 07:51:55 +0000 (09:51 +0200)
committerPeter Eisentraut <peter@eisentraut.org>
Tue, 10 Sep 2024 08:03:23 +0000 (10:03 +0200)
commit56fead44dcc70df9f9188fee08e5aefe3da43ccc
treee7b2c776e4d5f2727403d19c16066d6ffb28a741
parentf5050f795aea67dfc40bbc429c8934e9439e22e7
Add amgettreeheight index AM API routine

The only current implementation is for btree where it calls
_bt_getrootheight().  Other index types can now also use this to pass
information to their amcostestimate routine.  Previously, btree was
hardcoded and other index types could not hook into the optimizer at
this point.

Author: Mark Dilger <mark.dilger@enterprisedb.com>
Discussion: https://www.postgresql.org/message-id/flat/E72EAA49-354D-4C2E-8EB9-255197F55330@enterprisedb.com
12 files changed:
contrib/bloom/blutils.c
doc/src/sgml/indexam.sgml
src/backend/access/brin/brin.c
src/backend/access/gin/ginutil.c
src/backend/access/gist/gist.c
src/backend/access/hash/hash.c
src/backend/access/nbtree/nbtree.c
src/backend/access/spgist/spgutils.c
src/backend/optimizer/util/plancat.c
src/include/access/amapi.h
src/include/access/nbtree.h
src/test/modules/dummy_index_am/dummy_index_am.c