From 56fead44dcc70df9f9188fee08e5aefe3da43ccc Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Tue, 10 Sep 2024 09:51:55 +0200 Subject: 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 Discussion: https://www.postgresql.org/message-id/flat/E72EAA49-354D-4C2E-8EB9-255197F55330@enterprisedb.com --- src/backend/access/gist/gist.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/backend/access/gist') diff --git a/src/backend/access/gist/gist.c b/src/backend/access/gist/gist.c index ed4ffa63a77..2d7a0687d4a 100644 --- a/src/backend/access/gist/gist.c +++ b/src/backend/access/gist/gist.c @@ -91,6 +91,7 @@ gisthandler(PG_FUNCTION_ARGS) amroutine->amvacuumcleanup = gistvacuumcleanup; amroutine->amcanreturn = gistcanreturn; amroutine->amcostestimate = gistcostestimate; + amroutine->amgettreeheight = NULL; amroutine->amoptions = gistoptions; amroutine->amproperty = gistproperty; amroutine->ambuildphasename = NULL; -- cgit v1.2.3