diff --git a/src/backend/access/gist/gistbuildbuffers.c b/src/backend/access/gist/gistbuildbuffers.c new file mode 100644 index 39aec85..e8deb80 *** a/src/backend/access/gist/gistbuildbuffers.c --- b/src/backend/access/gist/gistbuildbuffers.c *************** gistRelocateBuildBuffersOnSplit(GISTBuil *** 666,672 **** { which = i; which_grow[j] = usize; ! if (j < r->rd_att->natts - 1 && i == 0) which_grow[j + 1] = -1; sum_grow += which_grow[j]; } --- 666,672 ---- { which = i; which_grow[j] = usize; ! if (j < r->rd_att->natts - 1) which_grow[j + 1] = -1; sum_grow += which_grow[j]; } diff --git a/src/backend/access/gist/gistutil.c b/src/backend/access/gist/gistutil.c new file mode 100644 index df1e2e3..f0a5872 *** a/src/backend/access/gist/gistutil.c --- b/src/backend/access/gist/gistutil.c *************** gistchoose(Relation r, Page p, IndexTupl *** 411,417 **** { which = i; which_grow[j] = usize; ! if (j < r->rd_att->natts - 1 && i == FirstOffsetNumber) which_grow[j + 1] = -1; sum_grow += which_grow[j]; } --- 411,417 ---- { which = i; which_grow[j] = usize; ! if (j < r->rd_att->natts - 1) which_grow[j + 1] = -1; sum_grow += which_grow[j]; }