summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Geoghegan <pg@bowt.ie>2020-03-01 12:11:26 -0800
committerPeter Geoghegan <pg@bowt.ie>2020-03-01 12:11:26 -0800
commit84ec9b231a865348f5388dcc125c084297709332 (patch)
treebcc62a251d8a2903ae359493ab400521620a395c /src
parent43a899f41f46918a0bf442edb091b08c214c68f8 (diff)
Remove dead code from _bt_update_posting().
Discussion: https://postgr.es/m/CAH2-WzmAufHiOku6AGiFD=81VQs5nYJ1L2YkhW1t+BH4CMsgRw@mail.gmail.com
Diffstat (limited to 'src')
-rw-r--r--src/backend/access/nbtree/nbtdedup.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/backend/access/nbtree/nbtdedup.c b/src/backend/access/nbtree/nbtdedup.c
index e5481f2f93f..3175d6fdd1d 100644
--- a/src/backend/access/nbtree/nbtdedup.c
+++ b/src/backend/access/nbtree/nbtdedup.c
@@ -674,11 +674,6 @@ _bt_update_posting(BTVacuumPosting vacposting)
Assert(_bt_posting_valid(origtuple));
Assert(nhtids > 0 && nhtids < BTreeTupleGetNPosting(origtuple));
- if (BTreeTupleIsPosting(origtuple))
- keysize = BTreeTupleGetPostingOffset(origtuple);
- else
- keysize = IndexTupleSize(origtuple);
-
/*
* Determine final size of new tuple.
*
@@ -686,6 +681,7 @@ _bt_update_posting(BTVacuumPosting vacposting)
* for new posting list tuples. We avoid calling _bt_form_posting() here
* to save ourselves a second memory allocation for a htids workspace.
*/
+ keysize = BTreeTupleGetPostingOffset(origtuple);
if (nhtids > 1)
newsize = MAXALIGN(keysize +
nhtids * sizeof(ItemPointerData));