index 55eab1461733af71111f1841ef372087b6868050..6eb83639aa0465695b5d8f86f26e3d31fee0057f 100644 (file)
insertdata.isDelete = false;
- /* During index build, count the to-be-inserted entry */
- if (buildStats)
- buildStats->nEntries++;
-
ginPrepareEntryScan(&btree, attnum, key, category, ginstate);
btree.isBuild = (buildStats != NULL);
/* no match, so construct a new leaf entry */
itup = buildFreshLeafTuple(ginstate, attnum, key, category,
items, nitem, buildStats, stack->buffer);
+
+ /*
+ * nEntries counts leaf tuples, so increment it only when we make a
+ * new one.
+ */
+ if (buildStats)
+ buildStats->nEntries++;
}
/* Insert the new or modified leaf tuple */