Fix tuple counting in SP-GiST index build.
authorTom Lane
Thu, 22 Mar 2018 17:23:48 +0000 (13:23 -0400)
committerTom Lane
Thu, 22 Mar 2018 17:23:48 +0000 (13:23 -0400)
commit7f6f8ccd976da21c0117bddfee8bd86226bd2559
tree43a357c09d9e220f4dc07dbf75fea6b6538a2713
parent67e02cde7373b09a8f6897b7fea3800ceb91ad9e
Fix tuple counting in SP-GiST index build.

Count the number of tuples in the index honestly, instead of assuming
that it's the same as the number of tuples in the heap.  (It might be
different if the index is partial.)

Back-patch to all supported versions.

Tomas Vondra

Discussion: https://postgr.es/m/3b3d8eac-c709-0d25-088e-b98339a1b28a@2ndquadrant.com
src/backend/access/spgist/spginsert.c