aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/gist/gistbuild.c
diff options
context:
space:
mode:
authorAndres Freund <andres@anarazel.de>2019-11-08 00:44:52 -0800
committerAndres Freund <andres@anarazel.de>2019-11-08 11:49:29 -0800
commitaae50236e4ce95c05a3962be0814c74c5a22206d (patch)
treeab040612da65567def53a6ee17db9b0b54f3037d /src/backend/access/gist/gistbuild.c
parent71a8a4f6e36547bb060dbcc961ea9b57420f7190 (diff)
downloadpostgresql-aae50236e4ce95c05a3962be0814c74c5a22206d.tar.gz
postgresql-aae50236e4ce95c05a3962be0814c74c5a22206d.zip
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 'src/backend/access/gist/gistbuild.c')
-rw-r--r--src/backend/access/gist/gistbuild.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/backend/access/gist/gistbuild.c b/src/backend/access/gist/gistbuild.c
index 2f4543dee52..739846a257d 100644
--- a/src/backend/access/gist/gistbuild.c
+++ b/src/backend/access/gist/gistbuild.c
@@ -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)
{