Remove useless argument from nbtree dedup function.
authorPeter Geoghegan <[email protected]>
Tue, 18 Apr 2023 17:33:15 +0000 (10:33 -0700)
committerPeter Geoghegan <[email protected]>
Tue, 18 Apr 2023 17:33:15 +0000 (10:33 -0700)
_bt_dedup_pass()'s heapRel argument hasn't been needed or used since
commit cf2acaf4dc made deleting any existing LP_DEAD index tuples the
caller's responsibility.

src/backend/access/nbtree/nbtdedup.c
src/backend/access/nbtree/nbtinsert.c
src/include/access/nbtree.h

index 0349988cf5e4d1ef461562d0879840a775ff3d66..d4db0b28f28e077e0c1b1e79a810e2626bc07a83 100644 (file)
@@ -55,8 +55,8 @@ static bool _bt_posting_valid(IndexTuple posting);
  * LP_DEAD bits set.
  */
 void
-_bt_dedup_pass(Relation rel, Buffer buf, Relation heapRel, IndexTuple newitem,
-              Size newitemsz, bool bottomupdedup)
+_bt_dedup_pass(Relation rel, Buffer buf, IndexTuple newitem, Size newitemsz,
+              bool bottomupdedup)
 {
    OffsetNumber offnum,
                minoff,
index 8c6e867c6191f3673779b38a7b5750b801a88724..84bbd78d59ca13435d0c691642aa583a40e1eac6 100644 (file)
@@ -2769,8 +2769,8 @@ _bt_delete_or_dedup_one_page(Relation rel, Relation heapRel,
 
    /* Perform deduplication pass (when enabled and index-is-allequalimage) */
    if (BTGetDeduplicateItems(rel) && itup_key->allequalimage)
-       _bt_dedup_pass(rel, buffer, heapRel, insertstate->itup,
-                      insertstate->itemsz, (indexUnchanged || uniquedup));
+       _bt_dedup_pass(rel, buffer, insertstate->itup, insertstate->itemsz,
+                      (indexUnchanged || uniquedup));
 }
 
 /*
index 953bf6586b98bf2eec73a9bfcba81a304943cd14..d6847860959eadad3b7f185b21b8b206160c9edc 100644 (file)
@@ -1157,9 +1157,8 @@ extern void _bt_parallel_advance_array_keys(IndexScanDesc scan);
 /*
  * prototypes for functions in nbtdedup.c
  */
-extern void _bt_dedup_pass(Relation rel, Buffer buf, Relation heapRel,
-                          IndexTuple newitem, Size newitemsz,
-                          bool bottomupdedup);
+extern void _bt_dedup_pass(Relation rel, Buffer buf, IndexTuple newitem,
+                          Size newitemsz, bool bottomupdedup);
 extern bool _bt_bottomupdel_pass(Relation rel, Buffer buf, Relation heapRel,
                                 Size newitemsz);
 extern void _bt_dedup_start_pending(BTDedupState state, IndexTuple base,