From: Peter Geoghegan Date: Tue, 18 Apr 2023 17:33:15 +0000 (-0700) Subject: Remove useless argument from nbtree dedup function. X-Git-Tag: REL_16_BETA1~173 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=06e0652750e347bc3bf1dbb88d6a2a5d9b6f8faa;p=thirdparty%2Fpostgresql.git Remove useless argument from nbtree dedup function. _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. --- diff --git a/src/backend/access/nbtree/nbtdedup.c b/src/backend/access/nbtree/nbtdedup.c index 0349988cf5e..d4db0b28f28 100644 --- a/src/backend/access/nbtree/nbtdedup.c +++ b/src/backend/access/nbtree/nbtdedup.c @@ -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, diff --git a/src/backend/access/nbtree/nbtinsert.c b/src/backend/access/nbtree/nbtinsert.c index 8c6e867c619..84bbd78d59c 100644 --- a/src/backend/access/nbtree/nbtinsert.c +++ b/src/backend/access/nbtree/nbtinsert.c @@ -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)); } /* diff --git a/src/include/access/nbtree.h b/src/include/access/nbtree.h index 953bf6586b9..d6847860959 100644 --- a/src/include/access/nbtree.h +++ b/src/include/access/nbtree.h @@ -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,