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/spgist/spgutils.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/backend/access/spgist/spgutils.c') diff --git a/src/backend/access/spgist/spgutils.c b/src/backend/access/spgist/spgutils.c index 76b80146ff0..72b7661971f 100644 --- a/src/backend/access/spgist/spgutils.c +++ b/src/backend/access/spgist/spgutils.c @@ -76,6 +76,7 @@ spghandler(PG_FUNCTION_ARGS) amroutine->amvacuumcleanup = spgvacuumcleanup; amroutine->amcanreturn = spgcanreturn; amroutine->amcostestimate = spgcostestimate; + amroutine->amgettreeheight = NULL; amroutine->amoptions = spgoptions; amroutine->amproperty = spgproperty; amroutine->ambuildphasename = NULL; -- cgit v1.2.3