From 121f53b8ff61c90c9376cb83b5d6d16dcfa573aa Mon Sep 17 00:00:00 2001 From: Heikki Linnakangas Date: Fri, 26 Jan 2024 22:45:10 +0200 Subject: [PATCH] Remove unused heapRel arguments (#443) --- src/hnsw.h | 2 +- src/hnswbuild.c | 4 ++-- src/hnswinsert.c | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/hnsw.h b/src/hnsw.h index 5531b4e..dd1ba4f 100644 --- a/src/hnsw.h +++ b/src/hnsw.h @@ -381,7 +381,7 @@ void HnswUpdateMetaPage(Relation index, int updateEntry, HnswElement entryPoint void HnswSetNeighborTuple(char *base, HnswNeighborTuple ntup, HnswElement e, int m); void HnswAddHeapTid(HnswElement element, ItemPointer heaptid); void HnswInitNeighbors(char *base, HnswElement element, int m, HnswAllocator * alloc); -bool HnswInsertTupleOnDisk(Relation index, Datum value, Datum *values, bool *isnull, ItemPointer heap_tid, Relation heapRel, bool building); +bool HnswInsertTupleOnDisk(Relation index, Datum value, Datum *values, bool *isnull, ItemPointer heap_tid, bool building); void HnswUpdateNeighborsOnDisk(Relation index, FmgrInfo *procinfo, Oid collation, HnswElement e, int m, bool checkExisting, bool building); void HnswLoadElementFromTuple(HnswElement element, HnswElementTuple etup, bool loadHeaptids, bool loadVec); void HnswLoadElement(HnswElement element, float *distance, Datum *q, Relation index, FmgrInfo *procinfo, Oid collation, bool loadVec); diff --git a/src/hnswbuild.c b/src/hnswbuild.c index 84e95d0..5d5b397 100644 --- a/src/hnswbuild.c +++ b/src/hnswbuild.c @@ -496,7 +496,7 @@ InsertTuple(Relation index, Datum *values, bool *isnull, ItemPointer heaptid, Hn { LWLockRelease(flushLock); - return HnswInsertTupleOnDisk(index, value, values, isnull, heaptid, buildstate->heap, true); + return HnswInsertTupleOnDisk(index, value, values, isnull, heaptid, true); } /* @@ -528,7 +528,7 @@ InsertTuple(Relation index, Datum *values, bool *isnull, ItemPointer heaptid, Hn LWLockRelease(flushLock); - return HnswInsertTupleOnDisk(index, value, values, isnull, heaptid, buildstate->heap, true); + return HnswInsertTupleOnDisk(index, value, values, isnull, heaptid, true); } /* Ok, we can proceed to allocate the element */ diff --git a/src/hnswinsert.c b/src/hnswinsert.c index b00be17..d3d0abd 100644 --- a/src/hnswinsert.c +++ b/src/hnswinsert.c @@ -570,7 +570,7 @@ UpdateGraphOnDisk(Relation index, FmgrInfo *procinfo, Oid collation, HnswElement * Insert a tuple into the index */ bool -HnswInsertTupleOnDisk(Relation index, Datum value, Datum *values, bool *isnull, ItemPointer heap_tid, Relation heapRel, bool building) +HnswInsertTupleOnDisk(Relation index, Datum value, Datum *values, bool *isnull, ItemPointer heap_tid, bool building) { HnswElement entryPoint; HnswElement element; @@ -625,7 +625,7 @@ HnswInsertTupleOnDisk(Relation index, Datum value, Datum *values, bool *isnull, * Insert a tuple into the index */ static void -HnswInsertTuple(Relation index, Datum *values, bool *isnull, ItemPointer heap_tid, Relation heapRel) +HnswInsertTuple(Relation index, Datum *values, bool *isnull, ItemPointer heap_tid) { Datum value; FmgrInfo *normprocinfo; @@ -642,7 +642,7 @@ HnswInsertTuple(Relation index, Datum *values, bool *isnull, ItemPointer heap_ti return; } - HnswInsertTupleOnDisk(index, value, values, isnull, heap_tid, heapRel, false); + HnswInsertTupleOnDisk(index, value, values, isnull, heap_tid, false); } /* @@ -671,7 +671,7 @@ hnswinsert(Relation index, Datum *values, bool *isnull, ItemPointer heap_tid, oldCtx = MemoryContextSwitchTo(insertCtx); /* Insert tuple */ - HnswInsertTuple(index, values, isnull, heap_tid, heap); + HnswInsertTuple(index, values, isnull, heap_tid); /* Delete memory context */ MemoryContextSwitchTo(oldCtx);