aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Geoghegan <pg@bowt.ie>2019-05-07 21:42:12 -0700
committerPeter Geoghegan <pg@bowt.ie>2019-05-07 21:42:12 -0700
commitd65b5ccad626e1942c862e8a70f56ad7ee7a8003 (patch)
treeff964c962864cc90af5e011597675ba9fbaec829 /src
parente5f978631722bb3cac42f0eb6e65e947e0f088ec (diff)
downloadpostgresql-d65b5ccad626e1942c862e8a70f56ad7ee7a8003.tar.gz
postgresql-d65b5ccad626e1942c862e8a70f56ad7ee7a8003.zip
Correct obsolete nbtsort.c minimum key comment.
It is no longer possible under any circumstances for nbtree code to reconstruct a strict lower bound key (parent page's pivot tuple key) for a right sibling page by retrieving the first item in the right sibling page.
Diffstat (limited to 'src')
-rw-r--r--src/backend/access/nbtree/nbtsort.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/backend/access/nbtree/nbtsort.c b/src/backend/access/nbtree/nbtsort.c
index cc50ec1fa43..0b5be776d63 100644
--- a/src/backend/access/nbtree/nbtsort.c
+++ b/src/backend/access/nbtree/nbtsort.c
@@ -1007,9 +1007,8 @@ _bt_buildadd(BTWriteState *wstate, BTPageState *state, IndexTuple itup)
pfree(state->btps_minkey);
/*
- * Save a copy of the minimum key for the new page. We have to copy
- * it off the old page, not the new one, in case we are not at leaf
- * level.
+ * Save a copy of the high key from the old page. It is also used as
+ * the minimum key for the new page.
*/
state->btps_minkey = CopyIndexTuple(oitup);
@@ -1045,9 +1044,8 @@ _bt_buildadd(BTWriteState *wstate, BTPageState *state, IndexTuple itup)
* If the new item is the first for its page, stash a copy for later. Note
* this will only happen for the first item on a level; on later pages,
* the first item for a page is copied from the prior page in the code
- * above. Since the minimum key for an entire level is only used as a
- * minus infinity downlink, and never as a high key, there is no need to
- * truncate away suffix attributes at this point.
+ * above. The minimum key for an entire level is nothing more than a
+ * minus infinity (downlink only) pivot tuple placeholder.
*/
if (last_off == P_HIKEY)
{