mirror of
https://github.com/postgres/postgres.git
synced 2025-06-14 18:42:34 +03:00
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
This commit is contained in:
@ -80,7 +80,7 @@ typedef struct
|
||||
static void gistInitBuffering(GISTBuildState *buildstate);
|
||||
static int calculatePagesPerBuffer(GISTBuildState *buildstate, int levelStep);
|
||||
static void gistBuildCallback(Relation index,
|
||||
HeapTuple htup,
|
||||
ItemPointer tid,
|
||||
Datum *values,
|
||||
bool *isnull,
|
||||
bool tupleIsAlive,
|
||||
@ -440,7 +440,7 @@ calculatePagesPerBuffer(GISTBuildState *buildstate, int levelStep)
|
||||
*/
|
||||
static void
|
||||
gistBuildCallback(Relation index,
|
||||
HeapTuple htup,
|
||||
ItemPointer tid,
|
||||
Datum *values,
|
||||
bool *isnull,
|
||||
bool tupleIsAlive,
|
||||
@ -454,7 +454,7 @@ gistBuildCallback(Relation index,
|
||||
|
||||
/* form an index tuple and point it at the heap tuple */
|
||||
itup = gistFormTuple(buildstate->giststate, index, values, isnull, true);
|
||||
itup->t_tid = htup->t_self;
|
||||
itup->t_tid = *tid;
|
||||
|
||||
if (buildstate->bufferingMode == GIST_BUFFERING_ACTIVE)
|
||||
{
|
||||
|
Reference in New Issue
Block a user