diff options
author | Andres Freund | 2019-03-28 02:59:06 +0000 |
---|---|---|
committer | Andres Freund | 2019-03-28 02:59:06 +0000 |
commit | 2a96909a4a8c38705163b83a81b228d5aec197f9 (patch) | |
tree | 566d1b8848467ad68ca336a602ac5ab49a476d69 /contrib/bloom/blinsert.c | |
parent | 12bb35fc9b000d462b9bd6b8856e1884ef1bb3d7 (diff) |
tableam: Support for an index build's initial table scan(s).
To support building indexes over tables of different AMs, the scans to
do so need to be routed through the table AM. While moving a fair
amount of code, nearly all the changes are just moving code to below a
callback.
Currently the range based interface wouldn't make much sense for non
block based table AMs. But that seems aceptable for now.
Author: Andres Freund
Discussion: https://postgr.es/m/[email protected]
Diffstat (limited to 'contrib/bloom/blinsert.c')
-rw-r--r-- | contrib/bloom/blinsert.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/contrib/bloom/blinsert.c b/contrib/bloom/blinsert.c index e43fbe0005f..1b8df7e1e84 100644 --- a/contrib/bloom/blinsert.c +++ b/contrib/bloom/blinsert.c @@ -14,6 +14,7 @@ #include "access/genam.h" #include "access/generic_xlog.h" +#include "access/tableam.h" #include "catalog/index.h" #include "miscadmin.h" #include "storage/bufmgr.h" @@ -69,7 +70,7 @@ initCachedPage(BloomBuildState *buildstate) } /* - * Per-tuple callback from IndexBuildHeapScan. + * Per-tuple callback for table_index_build_scan. */ static void bloomBuildCallback(Relation index, HeapTuple htup, Datum *values, @@ -141,9 +142,9 @@ blbuild(Relation heap, Relation index, IndexInfo *indexInfo) initCachedPage(&buildstate); /* Do the heap scan */ - reltuples = IndexBuildHeapScan(heap, index, indexInfo, true, - bloomBuildCallback, (void *) &buildstate, - NULL); + reltuples = table_index_build_scan(heap, index, indexInfo, true, + bloomBuildCallback, (void *) &buildstate, + NULL); /* Flush last page if needed (it will be, unless heap was empty) */ if (buildstate.count > 0) |