summaryrefslogtreecommitdiff
path: root/contrib/bloom/blinsert.c
diff options
context:
space:
mode:
authorAndres Freund2019-11-08 08:44:52 +0000
committerAndres Freund2019-11-08 19:49:29 +0000
commitaae50236e4ce95c05a3962be0814c74c5a22206d (patch)
treeab040612da65567def53a6ee17db9b0b54f3037d /contrib/bloom/blinsert.c
parent71a8a4f6e36547bb060dbcc961ea9b57420f7190 (diff)
Pass ItemPointer not HeapTuple to IndexBuildCallback.
Not all AMs use HeapTuples internally, making it inconvenient to pass a HeapTuple. As the index callbacks really only need the TID, not the full tuple, modify callback to only take ItemPointer. Author: Ashwin Agrawal Reviewed-By: Andres Freund Discussion: https://postgr.es/m/CALfoeis6=8ehuR=VNtHvj3z16cYfCwPdTcpaxU+sfSUJ5QgR3g@mail.gmail.com
Diffstat (limited to 'contrib/bloom/blinsert.c')
-rw-r--r--contrib/bloom/blinsert.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/bloom/blinsert.c b/contrib/bloom/blinsert.c
index 30d17f501db..adcbd168fb6 100644
--- a/contrib/bloom/blinsert.c
+++ b/contrib/bloom/blinsert.c
@@ -72,7 +72,7 @@ initCachedPage(BloomBuildState *buildstate)
* Per-tuple callback for table_index_build_scan.
*/
static void
-bloomBuildCallback(Relation index, HeapTuple htup, Datum *values,
+bloomBuildCallback(Relation index, ItemPointer tid, Datum *values,
bool *isnull, bool tupleIsAlive, void *state)
{
BloomBuildState *buildstate = (BloomBuildState *) state;
@@ -81,7 +81,7 @@ bloomBuildCallback(Relation index, HeapTuple htup, Datum *values,
oldCtx = MemoryContextSwitchTo(buildstate->tmpCtx);
- itup = BloomFormTuple(&buildstate->blstate, &htup->t_self, values, isnull);
+ itup = BloomFormTuple(&buildstate->blstate, tid, values, isnull);
/* Try to add next item to cached page */
if (BloomPageAddItem(&buildstate->blstate, buildstate->data.data, itup))